1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Fix problem with repeatedly cancelling a draft

Fixes #1266
This commit is contained in:
Jermolene 2014-12-22 08:40:11 +00:00
parent 8cb7090c40
commit 1adfe20508

View File

@ -333,12 +333,12 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
// Flip the specified tiddler from draft back to the original
var draftTitle = event.param || event.tiddlerTitle,
draftTiddler = this.wiki.getTiddler(draftTitle),
originalTitle = draftTiddler.fields["draft.of"],
originalTiddler = this.wiki.getTiddler(originalTitle),
storyList = this.getStoryList();
originalTitle = draftTiddler && draftTiddler.fields["draft.of"];
if(draftTiddler && originalTitle) {
// Ask for confirmation if the tiddler text has changed
var isConfirmed = true;
var isConfirmed = true,
originalTiddler = this.wiki.getTiddler(originalTitle),
storyList = this.getStoryList();
if(this.wiki.isDraftModified(draftTitle)) {
isConfirmed = confirm($tw.language.getString(
"ConfirmCancelTiddler",