Merge pull request #251 from MiguelCastillo/master
Adding charAt in keypath parse instead of array operator
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -8,7 +8,8 @@ class Rivets.KeypathParser | ... | @@ -8,7 +8,8 @@ class Rivets.KeypathParser |
8 | tokens = [] | 8 | tokens = [] |
9 | current = {interface: root, path: ''} | 9 | current = {interface: root, path: ''} |
10 | 10 | ||
11 | for char in keypath | 11 | for index in [0...keypath.length] by 1 |
12 | char = keypath.charAt index | ||
12 | if char in interfaces | 13 | if char in interfaces |
13 | tokens.push current | 14 | tokens.push current |
14 | current = {interface: char, path: ''} | 15 | current = {interface: char, path: ''} | ... | ... |
-
Please register or sign in to post a comment