mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 20:10:03 +00:00
Merge pull request #1476 from tobibeer/fix-tm-delete-tiddler-doesnt-exist
Fix issue deleting non-existent tiddler
This commit is contained in:
commit
9cf1f8f96b
@ -208,8 +208,11 @@ NavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {
|
||||
var title = event.param || event.tiddlerTitle,
|
||||
tiddler = this.wiki.getTiddler(title),
|
||||
storyList = this.getStoryList(),
|
||||
originalTitle = tiddler.fields["draft.of"],
|
||||
originalTitle = tiddler ? tiddler.fields["draft.of"] : 0,
|
||||
confirmationTitle;
|
||||
if(!tiddler) {
|
||||
return false;
|
||||
}
|
||||
// Check if the tiddler we're deleting is in draft mode
|
||||
if(originalTitle) {
|
||||
// If so, we'll prompt for confirmation referencing the original tiddler
|
||||
|
Loading…
Reference in New Issue
Block a user