From 5f1b3c1b54e902f794d643e1a830497ad80a3554 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Fri, 4 Oct 2019 08:20:27 -0400 Subject: [PATCH] tidy assignment operator check --- src/compiler/compile/Component.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index 54d86689fd..423186e4f3 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -46,9 +46,6 @@ childKeys.EachBlock = childKeys.IfBlock = ['children', 'else']; childKeys.Attribute = ['value']; childKeys.ExportNamedDeclaration = ['declaration', 'specifiers']; -// There is no datatype that describes only the compound operators so we create this list here -const compoundAssignmentOperators = ["+=" , "-=" ,"*=", "/=" ,"%=" ,"**=", "<<=" ,">>=", ">>>=", "|=" ,"^=" ,"&="]; - function remove_node( code: MagicString, start: number, @@ -1275,9 +1272,7 @@ export default class Component { assignees.add(node.name); }); - - - if (compoundAssignmentOperators.findIndex(op => op === node.operator) !== -1) { + if (node.operator !== '=') { dependencies.add(left.name); } } else if (node.type === 'UpdateExpression') {