diff --git a/boot/boot.js b/boot/boot.js index e5128c225..3a2d3d765 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -271,14 +271,15 @@ $tw.utils.stringifyList = function(value) { $tw.utils.parseStringArray = function(value) { if(typeof value === "string") { var memberRegExp = /(?:^|[^\S\xA0])(?:\[\[(.*?)\]\])(?=[^\S\xA0]|$)|([\S\xA0]+)/mg, - results = [], + results = [], names = {}, match; do { match = memberRegExp.exec(value); if(match) { var item = match[1] || match[2]; - if(item !== undefined && results.indexOf(item) === -1) { + if(item !== undefined && !$tw.utils.hop(names,item)) { results.push(item); + names[item] = true; } } } while(match);