diff --git a/src/compiler/compile/utils/get_object.ts b/src/compiler/compile/utils/get_object.ts index 10760740a0..d6dc3b1e20 100644 --- a/src/compiler/compile/utils/get_object.ts +++ b/src/compiler/compile/utils/get_object.ts @@ -1,12 +1,12 @@ import { Node, - Identifier, -} from "estree"; + Identifier +} from 'estree'; export default function get_object(node: Node): Identifier { while (true) { - if (node.type === "MemberExpression") node = node.object; - else if (node.type === "CallExpression") node = node.callee; + if (node.type === 'MemberExpression') node = node.object; + else if (node.type === 'CallExpression') node = node.callee; else break; } return node as Identifier; diff --git a/test/runtime/samples/binding-input-text-map/_config.js b/test/runtime/samples/binding-input-text-map/_config.js index e0e25d419c..0345779f52 100644 --- a/test/runtime/samples/binding-input-text-map/_config.js +++ b/test/runtime/samples/binding-input-text-map/_config.js @@ -12,14 +12,13 @@ export default { assert.equal(input.value, '50'); component.map.get(component.id).x = 30; - component.map = component.map; assert.equal(input.value, '30'); input.value = '42'; await input.dispatchEvent(new window.Event('input')); assert.equal(input.value, '42'); - assert.equal(component.map.get(component.id).x, '42') + assert.equal(component.map.get(component.id).x, '42'); component.map.set(3, { x: 7, y: 8 }); component.id = 3;