From 23bd030ff2a274dfeaf73aafbad8594a50eed85f Mon Sep 17 00:00:00 2001 From: nsantacruz Date: Sat, 14 Dec 2024 22:10:08 +0200 Subject: [PATCH] fix(topics): keep track of categories for all topics in toc, not just leaves --- static/js/sefaria/sefaria.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/sefaria/sefaria.js b/static/js/sefaria/sefaria.js index aae230fedd..520fde8d89 100644 --- a/static/js/sefaria/sefaria.js +++ b/static/js/sefaria/sefaria.js @@ -2785,8 +2785,8 @@ _media: {}, this._topicTocCategory = this.topic_toc.reduce(this._initTopicTocCategoryReducer, {}); }, _initTopicTocCategoryReducer: function(a,c) { + a[c.slug] = c.parents; if (!c.children) { - a[c.slug] = c.parents; return a; } if (!c.parents) {