[Pkg-javascript-commits] [node-lexical-scope] 40/83: fix for implicit assignment
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 a2c7707c865597af2204f11409e1c7ac46e34a83
Author: James Halliday <mail at substack.net>
Date: Sun Mar 31 11:52:46 2013 -0700
fix for implicit assignment
---
index.js | 4 +++-
package.json | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/index.js b/index.js
index 1598750..d8b9b57 100644
--- a/index.js
+++ b/index.js
@@ -42,7 +42,9 @@ module.exports = function (src) {
var isLeft0 = node.parent.left.type === 'MemberExpression'
&& node.parent.left.object === node.name
;
- var isLeft1 = node.parent.left.type === 'Identifier';
+ var isLeft1 = node.parent.left.type === 'Identifier'
+ && node.parent.left.name === node.name
+ ;
if (isLeft0 || isLeft1) {
exported[node.name] = keyOf(node).length;
}
diff --git a/package.json b/package.json
index fa4e147..1058ecf 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "lexical-scope",
- "version": "0.0.9",
+ "version": "0.0.10",
"description": "detect global and local lexical identifiers from javascript source code",
"main": "index.js",
"dependencies": {
--
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