[Pkg-javascript-commits] [node-lexical-scope] 43/83: Fix when right hand side of object member

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:45:49 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 c0e86adadf15083a04bdb2c87116799d8b44f9d5
Author: ForbesLindesay <forbes at lindesay.co.uk>
Date:   Tue May 21 09:44:58 2013 +0100

    Fix when right hand side of object member
---
 index.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index d8b9b57..ae5dbe0 100644
--- a/index.js
+++ b/index.js
@@ -32,10 +32,10 @@ module.exports = function (src) {
     walk(function (node) {
         if (node.type === 'Identifier'
         && lookup(node) === undefined) {
-            if (node.parent.type === 'Property') return;
+            if (node.parent.type === 'Property'
+            && node.parent.key === node) return;
             if (node.parent.type === 'MemberExpression'
             && node.parent.property === node) return;
-            
             if (isFunction(node.parent)) return;
             
             if (node.parent.type === 'AssignmentExpression') {

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