Browse Source

LibJS: Fix dump() indentation of UpdateExpression with suffix operator

Linus Groh 4 years ago
parent
commit
aa68de3530
1 changed files with 3 additions and 2 deletions
  1. 3 2
      Libraries/LibJS/AST.cpp

+ 3 - 2
Libraries/LibJS/AST.cpp

@@ -1442,9 +1442,10 @@ void UpdateExpression::dump(int indent) const
     }
     }
 
 
     ASTNode::dump(indent);
     ASTNode::dump(indent);
-    print_indent(indent + 1);
-    if (m_prefixed)
+    if (m_prefixed) {
+        print_indent(indent + 1);
         printf("%s\n", op_string);
         printf("%s\n", op_string);
+    }
     m_argument->dump(indent + 1);
     m_argument->dump(indent + 1);
     if (!m_prefixed) {
     if (!m_prefixed) {
         print_indent(indent + 1);
         print_indent(indent + 1);