1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-01 08:03:00 +00:00
jeremy@jermolene.com
2021-07-05 19:26:20 +01:00
parent 315464372f
commit 0b71f25f74
5 changed files with 21 additions and 92 deletions

View File

@@ -601,10 +601,7 @@ SaveTiddlerTask.prototype.run = function(callback) {
tiddler = this.syncer.wiki.tiddlerExists(this.title) && this.syncer.wiki.getTiddler(this.title);
this.syncer.logger.log("Dispatching 'save' task:",this.title);
if(tiddler) {
this.syncer.syncadaptor.saveTiddler(tiddler,{
changeCount: changeCount,
tiddlerInfo: self.syncer.tiddlerInfo[self.title]
},function(err,adaptorInfo,revision) {
this.syncer.syncadaptor.saveTiddler(tiddler,function(err,adaptorInfo,revision) {
// If there's an error, exit without changing any internal state
if(err) {
return callback(err);
@@ -618,6 +615,8 @@ SaveTiddlerTask.prototype.run = function(callback) {
};
// Invoke the callback
callback(null);
},{
tiddlerInfo: self.syncer.tiddlerInfo[self.title]
});
} else {
this.syncer.logger.log(" Not Dispatching 'save' task:",this.title,"tiddler does not exist");
@@ -634,9 +633,7 @@ function DeleteTiddlerTask(syncer,title) {
DeleteTiddlerTask.prototype.run = function(callback) {
var self = this;
this.syncer.logger.log("Dispatching 'delete' task:",this.title);
this.syncer.syncadaptor.deleteTiddler(this.title,{
tiddlerInfo: self.syncer.tiddlerInfo[this.title]
},function(err,adaptorInfo) {
this.syncer.syncadaptor.deleteTiddler(this.title,function(err) {
// If there's an error, exit without changing any internal state
if(err) {
return callback(err);
@@ -645,6 +642,8 @@ DeleteTiddlerTask.prototype.run = function(callback) {
delete self.syncer.tiddlerInfo[self.title];
// Invoke the callback
callback(null);
},{
tiddlerInfo: self.syncer.tiddlerInfo[this.title]
});
};