diff --git a/compiler/CompileContext.js b/compiler/CompileContext.js index a1d8a3429..e8cf087fe 100644 --- a/compiler/CompileContext.js +++ b/compiler/CompileContext.js @@ -267,6 +267,10 @@ class CompileContext { let attrDef = taglibLookup.getAttribute(tagName, attrName); if (!attrDef) { if (tagDef) { + if (node.removeAttribute) { + node.removeAttribute(attrName); + } + // var isAttrForTaglib = compiler.taglibs.isTaglib(attrUri); //Tag doesn't allow dynamic attributes this.addError({ diff --git a/compiler/ast/CustomTag.js b/compiler/ast/CustomTag.js index 0f55b7946..c8f3ab85e 100644 --- a/compiler/ast/CustomTag.js +++ b/compiler/ast/CustomTag.js @@ -131,6 +131,7 @@ function buildInputProps(el, context) { var attrDef = attr.def || context.taglibLookup.getAttribute(el.tagName, attr.name); if (!attrDef) { + context.addError(el, 'Unsupported attribute of "' + attrName + '" found on the <' + el.tagName + '> custom tag.'); return; // Skip over attributes that are not supported }