1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

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.
This commit is contained in:
Jermolene 2015-05-07 19:24:58 +01:00
parent 3644462a80
commit e9a1a53922

View File

@ -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;
}
}
}
});