[Pkg-javascript-commits] [less.js] 05/09: Fix double handling of exceptions

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


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

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

commit 7aa942d4490732ee303e662234a4ee4b99aae2f0
Author: Forbes Lindesay <forbes at lindesay.co.uk>
Date:   Wed Nov 26 15:13:15 2014 +0000

    Fix double handling of exceptions
---
 lib/less/render.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/less/render.js b/lib/less/render.js
index 4a56609..32c8e39 100644
--- a/lib/less/render.js
+++ b/lib/less/render.js
@@ -52,12 +52,13 @@ module.exports = function(environment, ParseTree, ImportManager) {
             new Parser(context, imports, rootFileInfo)
                 .parse(input, function (e, root) {
                 if (e) { return callback(e); }
+                var result;
                 try {
                     var parseTree = new ParseTree(root, imports);
-                    var result = parseTree.toCSS(options);
-                    callback(null, result);
+                    result = parseTree.toCSS(options);
                 }
-                catch (err) { callback( err); }
+                catch (err) { return callback( err); }
+                callback(null, result);
             }, options);
         }
     };

-- 
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