From b2c1331c117ac369a3b65df6a40a43e616277afd Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 3 May 2014 12:12:07 +0100 Subject: [PATCH] Fix oversight in isDraftModified MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the original tiddler doesn’t exist then we should count the draft as always having been modified --- core/modules/wiki.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 09a843bde..e1031e6a2 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -1077,6 +1077,9 @@ exports.isDraftModified = function(title) { } var ignoredFields = ["created", "modified", "title", "draft.title", "draft.of", "tags"], origTiddler = this.getTiddler(tiddler.fields["draft.of"]); + if(!origTiddler) { + return true; + } if(tiddler.fields["draft.title"] !== tiddler.fields["draft.of"]) { return true; }