Fix problem with list fields containing `[[]]`

Fixes #603 - thanks @xcazin!

It no longer crashes but unfortunately if you round trip a tiddler out
of edit mode and back you’ll lose any empty double square brackets.
This commit is contained in:
Jermolene 2014-05-06 17:32:12 +01:00
parent d1c85f53c0
commit cc3d44aec1
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@ $tw.utils.parseStringArray = function(value) {
match = memberRegExp.exec(value);
if(match) {
var item = match[1] || match[2];
if(results.indexOf(item) === -1) {
if(item !== undefined && results.indexOf(item) === -1) {
results.push(item);
}
}