1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-09-11 07:16:08 +00:00

Fix problem with shadow tiddler iteration

See https://groups.google.com/d/topic/tiddlywiki/pNxZsSCVp7c/discussion
for more details of the bug.
This commit is contained in:
Jermolene
2014-05-17 01:12:08 +01:00
parent be0bc04929
commit e228ac42db
2 changed files with 16 additions and 2 deletions

View File

@@ -915,8 +915,12 @@ $tw.Wiki = function(options) {
// Iterate through all the shadows and then the tiddlers
this.eachShadowPlusTiddlers = function(callback) {
for(var title in shadowTiddlers) {
var shadowInfo = shadowTiddlers[title];
callback(shadowInfo.tiddler,title);
if(Object.prototype.hasOwnProperty.call(tiddlers,title)) {
callback(tiddlers[title],title);
} else {
var shadowInfo = shadowTiddlers[title];
callback(shadowInfo.tiddler,title);
}
}
for(var title in tiddlers) {
if(!Object.prototype.hasOwnProperty.call(shadowTiddlers,title)) {