mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-02 14:29:55 +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
|
// Get the current value of the tiddler we're editing
|
||||||
var tiddler = this.wiki.getTiddler(targetTitle);
|
var tiddler = this.wiki.getTiddler(targetTitle);
|
||||||
var defaultType = this.wiki.getTiddler("$:/config/DefaultMissingType");
|
var defaultType = this.wiki.getTiddlerText("$:/config/DefaultMissingType", "").trim();
|
||||||
var defaultFields = { type: defaultType !== null ? defaultType.fields['text'].trim() : "" };
|
var defaultFields = { type: defaultType };
|
||||||
// Save the initial value of the draft tiddler
|
// Save the initial value of the draft tiddler
|
||||||
draftTitle = this.generateDraftTitle(targetTitle);
|
draftTitle = this.generateDraftTitle(targetTitle);
|
||||||
var draftTiddler = new $tw.Tiddler({
|
var draftTiddler = new $tw.Tiddler({
|
||||||
@ -291,7 +291,7 @@ NavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) {
|
|||||||
"draft.of": targetTitle
|
"draft.of": targetTitle
|
||||||
},
|
},
|
||||||
this.wiki.getModificationFields(),
|
this.wiki.getModificationFields(),
|
||||||
tiddler == null ? defaultFields : {}
|
tiddler === null || tiddler === undefined ? defaultFields : {}
|
||||||
);
|
);
|
||||||
this.wiki.addTiddler(draftTiddler);
|
this.wiki.addTiddler(draftTiddler);
|
||||||
return draftTiddler;
|
return draftTiddler;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
title: $:/config/DefaultMissingType
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user