Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Length caching unnecessary in get
  • Loading branch information
Gabriel Farrell committed May 12, 2012
1 parent 24177cd commit 0f0f791
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/whiskers.js
Expand Up @@ -93,7 +93,7 @@
// get value with dot notation, e.g. get(obj, 'key.for.something')
function get(obj, key) {
var accessor = key.split('.');
for (var i=0, l=accessor.length; i<l; i++) {
for (var i=0; i<accessor.length; i++) {
if (!obj) return '';
obj = obj[accessor[i]];
}
Expand Down

0 comments on commit 0f0f791

Please sign in to comment.