From 5e12868e76d0f5d270c9d9baae2a0250ebb24762 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 18 Mar 2013 10:13:36 +0000 Subject: [PATCH] Fixes to ensure revision field is always a string TiddlyWeb returns it as a number, which seems like it might be an accident. --- core/modules/syncer.js | 2 +- plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/core/modules/syncer.js b/core/modules/syncer.js index 32648186f..4269e29b3 100644 --- a/core/modules/syncer.js +++ b/core/modules/syncer.js @@ -294,7 +294,7 @@ Syncer.prototype.enqueueSyncTask = function(task) { // Fill in some tiddlerInfo if the tiddler is one we haven't seen before if(!$tw.utils.hop(this.tiddlerInfo,task.title)) { this.tiddlerInfo[task.title] = { - revision: "0", + revision: null, adaptorInfo: {}, changeCount: -1 } diff --git a/plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js b/plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js index 943e55fce..f9cccce81 100644 --- a/plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js +++ b/plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js @@ -121,8 +121,16 @@ TiddlyWebAdaptor.prototype.getSkinnyTiddlers = function(callback) { if(err) { return callback(err); } + // Process the tiddlers to make sure the revision is a string + var tiddlers = JSON.parse(data); + for(var t=0; t