mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Fixed error reporting
This commit is contained in:
parent
0a3cb07a42
commit
8f171379bb
@ -208,6 +208,9 @@ ElementNode.prototype = {
|
||||
if (preserveWhitespace) {
|
||||
this.removePreserveSpaceAttr();
|
||||
}
|
||||
|
||||
var _this = this;
|
||||
|
||||
template.text('<' + name);
|
||||
this.forEachAttributeAnyNS(function (attr) {
|
||||
var prefix = attr.prefix;
|
||||
@ -243,9 +246,9 @@ ElementNode.prototype = {
|
||||
},
|
||||
error: function (message) {
|
||||
invalidAttr = true;
|
||||
this.addError('Invalid expression found in attribute "' + name + '". ' + message);
|
||||
_this.addError('Invalid expression found in attribute "' + name + '". ' + message);
|
||||
}
|
||||
}, this);
|
||||
});
|
||||
|
||||
if (invalidAttr) {
|
||||
template.text(name + '="' + escapeXmlAttr(attr.value) + '"');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user