1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 12:07:19 +00:00

Fix occasional crash from trying to save a tiddler after it has been deleted

This commit is contained in:
Jermolene 2013-12-12 15:16:44 +00:00
parent 6a21965cee
commit 49b3165fbd

View File

@ -437,6 +437,7 @@ Syncer.prototype.dispatchTask = function(task,callback) {
var changeCount = this.wiki.getChangeCount(task.title),
tiddler = this.wiki.getTiddler(task.title);
this.log("Dispatching 'save' task:",task.title);
if(tiddler) {
this.syncadaptor.saveTiddler(tiddler,function(err,adaptorInfo,revision) {
if(err) {
return callback(err);
@ -450,6 +451,7 @@ Syncer.prototype.dispatchTask = function(task,callback) {
// Invoke the callback
callback(null);
});
}
} else if(task.type === "load") {
// Load the tiddler
this.log("Dispatching 'load' task:",task.title);