1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Saving a shadow tiddler preserves its shadow status

This commit is contained in:
Jeremy Ruston 2012-06-06 22:19:34 +01:00
parent 2053b7c413
commit 3da70b925f

View File

@ -108,10 +108,11 @@ exports.addTiddler = function(tiddler,isShadow) {
if(!(tiddler instanceof $tw.Tiddler)) {
tiddler = new $tw.Tiddler(tiddler);
}
if(isShadow) {
var title = tiddler.fields.title,
prevTiddler = this.tiddlers[title];
if(isShadow || (prevTiddler && prevTiddler.isShadow)) {
tiddler.isShadow = true;
}
var title = tiddler.fields.title;
this.tiddlers[title] = tiddler;
this.clearCache(title);
this.touchTiddler(title);