Skip to content

Commit a540b0f

Browse files
Fail parsing on duplicate inline bindings. Fixes #53
1 parent 957e80a commit a540b0f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ng-template-parser/src/main/java/ng/appserver/templating/parser/NGTemplateParser.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,10 @@ private Map<String, NGBindingValue> parseBindings() throws NGHTMLFormatException
467467

468468
skipWhitespace();
469469

470+
if( bindings.containsKey( key ) ) {
471+
throw error( "Duplicate binding '%s'".formatted( key ) );
472+
}
473+
470474
// Check if this is a boolean attribute (no '=' follows) or a key=value binding
471475
if( _pos < _source.length() && current() == '=' ) {
472476
_pos++; // consume '='

0 commit comments

Comments
 (0)