1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-08 06:43:49 +00:00

Fixed problem with deleting fields in the Tiddler constructor

This commit is contained in:
Jeremy Ruston 2012-04-10 14:37:52 +01:00
parent 0c824f3ce7
commit 6479fff012

View File

@ -34,12 +34,17 @@ var Tiddler = function(/* tiddler,fields */) {
src = arg;
}
for(t in src) {
if(src[t] === undefined) {
// If we get a field that's undefined, delete any previous field value
delete fields[t];
} else {
f = Tiddler.parseTiddlerField(t,src[t]);
if(f !== null) {
fields[t] = f;
}
}
}
}
// Pull out the tags
if(fields.tags) {
tags = fields.tags;