7f3e7d58 by David McClure

In KeypathParer.parse, iterate over the keypath string with 'in' instead of 'of'.

1 parent 19bf8b2a
......@@ -637,14 +637,14 @@
function KeypathParser() {}
KeypathParser.parse = function(keypath, interfaces, root) {
var char, current, index, tokens;
var char, current, tokens, _i, _len;
tokens = [];
current = {
"interface": root,
path: ''
};
for (index in keypath) {
char = keypath[index];
for (_i = 0, _len = keypath.length; _i < _len; _i++) {
char = keypath[_i];
if (__indexOf.call(interfaces, char) >= 0) {
tokens.push(current);
current = {
......
......@@ -8,7 +8,7 @@ class Rivets.KeypathParser
tokens = []
current = {interface: root, path: ''}
for index, char of keypath
for char in keypath
if char in interfaces
tokens.push current
current = {interface: char, path: ''}
......