Browse Source

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

Herbert Vojčík 10 năm trước cách đây
mục cha
commit
459c39141e
1 tập tin đã thay đổi với 4 bổ sung3 xóa
  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();
+    });
 };