mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 05:19:57 +00:00
Incorporating PR feedback.
This commit is contained in:
parent
07e56fd09e
commit
837fba040b
@ -277,8 +277,8 @@ NavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) {
|
||||
}
|
||||
// Get the current value of the tiddler we're editing
|
||||
var tiddler = this.wiki.getTiddler(targetTitle);
|
||||
var defaultType = this.wiki.getTiddler("$:/config/DefaultMissingType");
|
||||
var defaultFields = { type: defaultType !== null ? defaultType.fields['text'].trim() : "" };
|
||||
var defaultType = this.wiki.getTiddlerText("$:/config/DefaultMissingType", "").trim();
|
||||
var defaultFields = { type: defaultType };
|
||||
// Save the initial value of the draft tiddler
|
||||
draftTitle = this.generateDraftTitle(targetTitle);
|
||||
var draftTiddler = new $tw.Tiddler({
|
||||
@ -291,7 +291,7 @@ NavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) {
|
||||
"draft.of": targetTitle
|
||||
},
|
||||
this.wiki.getModificationFields(),
|
||||
tiddler == null ? defaultFields : {}
|
||||
tiddler === null || tiddler === undefined ? defaultFields : {}
|
||||
);
|
||||
this.wiki.addTiddler(draftTiddler);
|
||||
return draftTiddler;
|
||||
|
@ -1,3 +0,0 @@
|
||||
title: $:/config/DefaultMissingType
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user