diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts index 5a1e2ecfae..07f1739018 100644 --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -599,14 +599,14 @@ export default class Element extends Node { } validate_bindings_foreign() { - this.bindings - .filter(binding => binding.name !== 'this') - .forEach(binding => { + this.bindings.forEach(binding => { + if (binding.name !== 'this') { this.component.error(binding, { code: 'invalid-binding', message: `'${binding.name}' is not a valid binding. Foreign elements only support bind:this` }); - }); + } + }); } validate_bindings() {