From 74b0f9f8543fd54786302c6c47ab0ca2dc56757a Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 7 Sep 2019 23:42:10 -0400 Subject: [PATCH] tweak --- src/compiler/compile/nodes/shared/Expression.ts | 2 +- src/compiler/compile/render_dom/index.ts | 2 +- src/compiler/compile/utils/invalidate.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/compile/nodes/shared/Expression.ts b/src/compiler/compile/nodes/shared/Expression.ts index 668dcb45f8..a5a730c4d1 100644 --- a/src/compiler/compile/nodes/shared/Expression.ts +++ b/src/compiler/compile/nodes/shared/Expression.ts @@ -399,7 +399,7 @@ export default class Expression { } }); - invalidate(component, scope, code, node, Array.from(traced)); + invalidate(component, scope, code, node, traced); } } }); diff --git a/src/compiler/compile/render_dom/index.ts b/src/compiler/compile/render_dom/index.ts index a08df9e83d..3802116949 100644 --- a/src/compiler/compile/render_dom/index.ts +++ b/src/compiler/compile/render_dom/index.ts @@ -179,7 +179,7 @@ export default function dom( // onto the initial function call const names = new Set(extract_names(assignee)); - invalidate(component, scope, code, node, Array.from(names)); + invalidate(component, scope, code, node, names); } } }); diff --git a/src/compiler/compile/utils/invalidate.ts b/src/compiler/compile/utils/invalidate.ts index 2b751a4e3e..0c93ce2694 100644 --- a/src/compiler/compile/utils/invalidate.ts +++ b/src/compiler/compile/utils/invalidate.ts @@ -4,7 +4,7 @@ import { Node } from '../../interfaces'; import { nodes_match } from '../../utils/nodes_match'; import { Scope } from './scope'; -export function invalidate(component: Component, scope: Scope, code: MagicString, node: Node, names: string[]) { +export function invalidate(component: Component, scope: Scope, code: MagicString, node: Node, names: Set) { const [head, ...tail] = Array.from(names).filter(name => { const owner = scope.find_owner(name); if (owner && owner !== component.instance_scope) return false;