From cc3d44aec1ff4f1bc2db197a039f9f25f01acd40 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 6 May 2014 17:32:12 +0100 Subject: [PATCH] Fix problem with list fields containing `[[]]` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- boot/boot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/boot.js b/boot/boot.js index c08acdcac..1d098429d 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -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); } }