From dcff318a985a2dcce19244fc80b478ca1fb39e23 Mon Sep 17 00:00:00 2001 From: Cameron Fischer Date: Thu, 16 Sep 2021 15:08:11 -0400 Subject: [PATCH] Fix wiki.eachShadow returns overridden sources (#6036) It was returning the underlying shadows before, even if overridden, which was causing some bugs. Fixes #6033 --- boot/boot.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index bb006e661..ed8da06d1 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -1212,8 +1212,12 @@ $tw.Wiki = function(options) { index,titlesLength,title; for(index = 0, titlesLength = titles.length; index < titlesLength; index++) { title = titles[index]; - var shadowInfo = shadowTiddlers[title]; - callback(shadowInfo.tiddler,title); + if(tiddlers[title]) { + callback(tiddlers[title],title); + } else { + var shadowInfo = shadowTiddlers[title]; + callback(shadowInfo.tiddler,title); + } } };