@riotjs/compiler
Advanced tools
Comparing version 4.9.0 to 4.9.1
{ | ||
"name": "@riotjs/compiler", | ||
"version": "4.9.0", | ||
"version": "4.9.1", | ||
"description": "Compiler for riot .tag files", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -67,16 +67,26 @@ import { | ||
function visitMemberExpression(path) { | ||
if (!isGlobal(path)) { | ||
if (path.value.computed) { | ||
this.traverse(path) | ||
} else if ( | ||
isArrayExpression(path.node.object) || | ||
isBinaryExpression(path.node.object) || | ||
path.node.object.computed | ||
) { | ||
this.traverse(path.get('object')) | ||
} else if (!path.node.object.callee) { | ||
replacePathScope(path, isThisExpression(path.node.object) ? path.node.property : path.node) | ||
} else { | ||
this.traverse(path.get('object')) | ||
const traversePathObject = () => this.traverse(path.get('object')) | ||
switch (true) { | ||
case isGlobal(path): | ||
if (path.node.object.arguments && path.node.object.arguments.length) { | ||
traversePathObject() | ||
} | ||
break | ||
case path.value.computed: | ||
this.traverse(path) | ||
break | ||
case isArrayExpression(path.node.object): | ||
case isBinaryExpression(path.node.object): | ||
case path.node.object.computed: | ||
traversePathObject() | ||
break | ||
case !path.node.object.callee: | ||
replacePathScope( | ||
path, | ||
isThisExpression(path.node.object) ? path.node.property : path.node | ||
) | ||
break | ||
default: | ||
traversePathObject() | ||
} | ||
@@ -83,0 +93,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2023184
53445