Parcourir la source

'Compile Time' only in verbose; finished_callback checked for null

Herbert Vojčík il y a 10 ans
Parent
commit
459c39141e
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      cli/support/amberc.js

+ 4 - 3
cli/support/amberc.js

@@ -143,13 +143,14 @@ AmberC.prototype.main = function(configuration, finished_callback) {
 	.then(verify)
 	.then(compose_js_files)
 	.then(function () {
-		console.log = console.ambercLog;
 		console.timeEnd('Compile Time');
 	}, function(error) {
-		console.log = console.ambercLog;
 		console.error(error);
 	})
-	.then(finished_callback);
+	.then(function () {
+        console.log = console.ambercLog;
+        finished_callback && finished_callback();
+    });
 };