pull/3533/head
Richard Harris 5 years ago
parent 46bfaff1e6
commit 5ad6489079

@ -7,10 +7,8 @@ import { Node } from '../../../interfaces';
import { globals , sanitize } from '../../../utils/names';
import deindent from '../../utils/deindent';
import Wrapper from '../../render_dom/wrappers/shared/Wrapper';
import TemplateScope from './TemplateScope';
import get_object from '../../utils/get_object';
// import { nodes_match } from '../../../utils/nodes_match';
import Block from '../../render_dom/Block';
import { INode } from '../interfaces';
import is_dynamic from '../../render_dom/wrappers/shared/is_dynamic';
@ -394,9 +392,7 @@ export default class Expression {
// (a or b). In destructuring cases (`[d, e] = [e, d]`) there
// may be more, in which case we need to tack the extra ones
// onto the initial function call
const names = new Set(assignee.type === 'MemberExpression'
? [get_object(assignee).name]
: extract_names(assignee));
const names = new Set(extract_names(assignee));
const traced: Set<string> = new Set();
names.forEach(name => {

@ -7,8 +7,6 @@ import { CompileOptions } from '../../interfaces';
import { walk } from 'estree-walker';
import { stringify_props } from '../utils/stringify_props';
import add_to_set from '../utils/add_to_set';
import get_object from '../utils/get_object';
// import { extract_names } from '../utils/scope';
import { nodes_match } from '../../utils/nodes_match';
import { extract_names } from '../utils/scope';
@ -179,9 +177,7 @@ export default function dom(
// (a or b). In destructuring cases (`[d, e] = [e, d]`) there
// may be more, in which case we need to tack the extra ones
// onto the initial function call
const names = new Set(assignee.type === 'MemberExpression'
? [get_object(assignee).name]
: extract_names(assignee));
const names = new Set(extract_names(assignee));
const [head, ...tail] = Array.from(names).filter(name => {
const owner = scope.find_owner(name);

Loading…
Cancel
Save