From e8c69ae7dca8983e018dbcb8a62f91d9b0d20cb7 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 7 Jun 2012 11:31:44 +0100 Subject: [PATCH] Comment updates --- core/modules/wiki.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/modules/wiki.js b/core/modules/wiki.js index ea0131b65..05e6e9eae 100644 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -108,11 +108,14 @@ exports.addTiddler = function(tiddler,isShadow) { if(!(tiddler instanceof $tw.Tiddler)) { tiddler = new $tw.Tiddler(tiddler); } + // Get the title, and the current tiddler with that title var title = tiddler.fields.title, prevTiddler = this.tiddlers[title]; + // Make it be a shadow if indicated or if it is already a shadow if(isShadow || (prevTiddler && prevTiddler.isShadow)) { tiddler.isShadow = true; } + // Save the tiddler this.tiddlers[title] = tiddler; this.clearCache(title); this.touchTiddler(title);