1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-11 09:50:27 +00:00

Comment updates

This commit is contained in:
Jeremy Ruston 2012-06-07 11:31:44 +01:00
parent 3da70b925f
commit e8c69ae7dc

View File

@ -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);