From e9a1a5392206de29b1ee0271d1a20bf699dc10c4 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 7 May 2015 19:24:58 +0100 Subject: [PATCH] Better error checking for reading field lists This change ensures that lines starting with a colon are ignored, allowing them to be used as comments. --- boot/boot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/boot/boot.js b/boot/boot.js index bc974c6d5..981ac7eb2 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -294,7 +294,9 @@ $tw.utils.parseFields = function(text,fields) { if(p !== -1) { var field = line.substr(0, p).trim(), value = line.substr(p+1).trim(); - fields[field] = value; + if(field) { + fields[field] = value; + } } } });