mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-28 19:10:28 +00:00
Fixed problem with deleting fields in the Tiddler constructor
This commit is contained in:
parent
0c824f3ce7
commit
6479fff012
@ -34,9 +34,14 @@ var Tiddler = function(/* tiddler,fields */) {
|
||||
src = arg;
|
||||
}
|
||||
for(t in src) {
|
||||
f = Tiddler.parseTiddlerField(t,src[t]);
|
||||
if(f !== null) {
|
||||
fields[t] = f;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user