Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Revert "Treat numbers as numbers in expressions"
Browse files Browse the repository at this point in the history
This reverts commit 3978609.
  • Loading branch information
rafaelw committed Mar 26, 2014
1 parent b506192 commit d03bd9b
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/polymer-expressions.js
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,6 @@
case 'true':
return true;
}

if (!isNaN(Number(name)))
return true;

return false;
};

Expand Down Expand Up @@ -642,17 +638,20 @@
return prepareEventBinding(path, name, this);
}

if (!isLiteralExpression(pathString) && path.valid) {
if (path.valid) {
if (path.length == 1) {
return function(model, node, oneTime) {
if (oneTime)
return path.getValueFrom(model);

var scope = findScope(model, path[0]);
return new PathObserver(scope, path);
};
if (!isLiteralExpression(path[0])) {
return function(model, node, oneTime) {
if (oneTime)
return path.getValueFrom(model);

var scope = findScope(model, path[0]);
return new PathObserver(scope, path);
};
}
} else {
return; // bail out early if pathString is simple path.
}
return; // bail out early if pathString is simple path.
}

return prepareBinding(pathString, name, node, this);
Expand Down

0 comments on commit d03bd9b

Please sign in to comment.