mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Avoid attempts to save a tiddler with an empty title
Clicking "save" with a blank title will now be ignored
This commit is contained in:
parent
38e92cd5cd
commit
1b094b1d5c
@ -191,7 +191,7 @@ NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {
|
||||
for(var t=0; t<this.storyList.length; t++) {
|
||||
if(this.storyList[t] === event.tiddlerTitle) {
|
||||
var tiddler = this.renderer.renderTree.wiki.getTiddler(event.tiddlerTitle);
|
||||
if(tiddler.hasField("draft.title")) {
|
||||
if(tiddler.hasField("draft.title") && tiddler.fields["draft.title"]) {
|
||||
// Save the draft tiddler as the real tiddler
|
||||
this.renderer.renderTree.wiki.addTiddler(new $tw.Tiddler(this.renderer.renderTree.wiki.getCreationFields(),tiddler,{
|
||||
title: tiddler.fields["draft.title"],
|
||||
|
Loading…
Reference in New Issue
Block a user