1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-27 10:30:28 +00:00

Made sure to remove "draft.of" field after use

This commit is contained in:
Jeremy Ruston 2012-04-10 14:38:27 +01:00
parent f89ca3c338
commit 71ded42b60

View File

@ -78,7 +78,7 @@ exports.macro = {
var tiddler = this.store.getTiddler(storyRecord.title);
if(tiddler && tiddler.hasOwnProperty("draft.title")) {
// Save the draft tiddler as the real tiddler
this.store.addTiddler(new Tiddler(tiddler,{title: tiddler["draft.title"],"draft.title": undefined}));
this.store.addTiddler(new Tiddler(tiddler,{title: tiddler["draft.title"],"draft.title": undefined, "draft.of": undefined}));
// Remove the draft tiddler
this.store.deleteTiddler(storyRecord.title);
// Remove the original tiddler if we're renaming it