Browse files

Fix event subscript bug

We want to skip over the 'on' so we need to skip the first 2 chars.
  • Loading branch information...
1 parent 020ddc7 commit f32ea09d7dba4f9cfd67ac35016143908d0644b0 @joewalker committed Aug 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/domtemplate.js
View
2 lib/domtemplate.js
@@ -125,7 +125,7 @@ Templater.prototype.processNode = function(node, data) {
node.removeAttribute('save');
} else if (name.substring(0, 2) === 'on') {
// If this attribute value contains only an expression
- if (value.substring(0, 1) === '${' && value.slice(-1) === '}' &&
+ if (value.substring(0, 2) === '${' && value.slice(-1) === '}' &&
value.indexOf('${', 2) === -1) {
value = this._stripBraces(value);
var func = this._property(value, data);

0 comments on commit f32ea09

Please sign in to comment.