[Pkg-javascript-commits] [node-lexical-scope] 57/83: Fix variables introduced by catch

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:45:51 UTC 2017


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

rouca pushed a commit to branch master
in repository node-lexical-scope.

commit b9f4f68eef45d91687cd3cd33c107fec5af32fbd
Author: ForbesLindesay <forbes at lindesay.co.uk>
Date:   Tue May 21 10:02:50 2013 +0100

    Fix variables introduced by catch
    
    closes #8
---
 index.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/index.js b/index.js
index 307b776..67f7cf0 100644
--- a/index.js
+++ b/index.js
@@ -17,6 +17,10 @@ module.exports = function (src) {
                 locals[id][d.id.name] = d;
             }
         }
+        else if (node.type === 'CatchClause') {
+            var id = getScope(node);
+            locals[id][node.param.name] = node.param
+        }
         else if (isFunction(node)) {
             var id = getScope(node.parent);
             if (node.id) locals[id][node.id.name] = node;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-lexical-scope.git



More information about the Pkg-javascript-commits mailing list