fix reference check for shorthand properties

This commit is contained in:
Christopher Monsanto
2015-04-29 17:55:26 -04:00
parent d30415d74a
commit f44c93add2
4 changed files with 18 additions and 3 deletions

View File

@@ -26,10 +26,11 @@ export function isReferenced(node: Object, parent: Object): boolean {
return false;
// yes: { [NODE]: "" }
// yes: { NODE }
// no: { NODE: "" }
case "Property":
if (parent.key === node) {
return parent.computed;
return parent.computed || parent.shorthand;
}
// no: var NODE = init;