From 877d9ff389fae4ba6bb9f6bb7570bfbf61c32d56 Mon Sep 17 00:00:00 2001 From: Tan Li Hau Date: Tue, 27 Jul 2021 22:34:54 +0800 Subject: [PATCH] move errors to compiler_errors --- src/compiler/compile/nodes/Element.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts index 4da159d31d..906bb229f9 100644 --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -653,10 +653,7 @@ export default class Element extends Node { } } else if (name === 'complete') { if (this.name !== 'img') { - component.error(binding, { - code: `invalid-binding`, - message: `'${binding.name}' binding can only be used with ` - }); + component.error(binding, compiler_errors.invalid_binding_element_with(binding.name, '')); } } else if (name !== 'this') { return component.error(binding, compiler_errors.invalid_binding(binding.name));