1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-26 19:47:20 +00:00

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

View File

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