From 4fd045269400ee628a97122253d2bc32b678688e Mon Sep 17 00:00:00 2001 From: utkarshgautamnyu Date: Tue, 26 Sep 2017 12:04:03 -0700 Subject: [PATCH] Update JSBaker.cpp --- libraries/baking/src/JSBaker.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/libraries/baking/src/JSBaker.cpp b/libraries/baking/src/JSBaker.cpp index 630b7ae78e..17c12c4d5e 100644 --- a/libraries/baking/src/JSBaker.cpp +++ b/libraries/baking/src/JSBaker.cpp @@ -76,7 +76,9 @@ void JSBaker::bakeJS(QFile* inputFile) { } else if (nextCharacter == '*') { // Check if multi line comment i.e. /* handleMultiLineComments(&in); - + if (hasErrors()) { + return; + } //Start fresh after handling comments previousCharacter = '\n'; in >> currentCharacter; @@ -147,13 +149,9 @@ void JSBaker::bakeJS(QFile* inputFile) { // Reading done. Closing the inputFile inputFile->close(); - - if (hasErrors()) { - return; - } else { - // Bake successful, Export the compressed outputFile - exportJS(&outputFile); - } + + // Bake successful, Export the compressed outputFile + exportJS(&outputFile); } void JSBaker::exportJS(QFile* bakedFile) {