diff --git a/src/libs/qmljs/qmljsreformatter.cpp b/src/libs/qmljs/qmljsreformatter.cpp index ae26ba1d90b..e95ff2f3394 100644 --- a/src/libs/qmljs/qmljsreformatter.cpp +++ b/src/libs/qmljs/qmljsreformatter.cpp @@ -921,12 +921,11 @@ protected: bool visit(PatternElement *ast) override { - if (!ast->isVariableDeclaration()) - return false; out(ast->identifierToken); if (ast->initializer) { - out(" = "); + if (ast->isVariableDeclaration()) + out(" = "); accept(ast->initializer); } return false;