[Pkg-javascript-commits] [less.js] 226/285: make sure an error is not lost

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:23:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v2.0.0
in repository less.js.

commit 5f09ee70792334ac39afb63d49619f41f61c1634
Author: Luke Page <luke.a.page at gmail.com>
Date:   Thu Oct 23 18:38:45 2014 +0100

    make sure an error is not lost
---
 lib/less/visitors/import-visitor.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/less/visitors/import-visitor.js b/lib/less/visitors/import-visitor.js
index d719cb2..6217504 100644
--- a/lib/less/visitors/import-visitor.js
+++ b/lib/less/visitors/import-visitor.js
@@ -34,7 +34,7 @@ ImportVisitor.prototype = {
 
         this.isFinished = true;
         if (this.importCount === 0) {
-            this._finish(error);
+            this._finish(error || this.error);
         }
     },
     visitImport: function (importNode, visitArgs) {
@@ -101,7 +101,9 @@ ImportVisitor.prototype = {
             importVisitor.importCount--;
 
             if (importVisitor.importCount === 0 && importVisitor.isFinished) {
-                importVisitor._finish(e);
+                importVisitor._finish(e || importVisitor.error);
+            } else if (e) {
+                importVisitor.error = e;
             }
         };
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list