Update JSBaker.cpp

This commit is contained in:
utkarshgautamnyu 2017-09-26 12:04:03 -07:00 committed by GitHub
parent 258c32f9aa
commit 4fd0452694

View file

@ -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) {