1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-28 04:19:56 +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,9 +34,14 @@ var Tiddler = function(/* tiddler,fields */) {
src = arg; src = arg;
} }
for(t in src) { for(t in src) {
f = Tiddler.parseTiddlerField(t,src[t]); if(src[t] === undefined) {
if(f !== null) { // If we get a field that's undefined, delete any previous field value
fields[t] = f; delete fields[t];
} else {
f = Tiddler.parseTiddlerField(t,src[t]);
if(f !== null) {
fields[t] = f;
}
} }
} }
} }