From 464c7dae0a7d4a1b1346d909338aeac83d282f93 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 20 Feb 2021 17:27:32 +0100 Subject: [PATCH] Fix an issue in index with open a version 1.2 project --- nw/core/index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nw/core/index.py b/nw/core/index.py index 2299ab0d..73d469c4 100644 --- a/nw/core/index.py +++ b/nw/core/index.py @@ -714,7 +714,8 @@ class NWIndex(): for refTitle in self._refIndex[tHandle]: for aTag in self._refIndex[tHandle][refTitle].get("tags", []): if len(aTag) == 3 and (sTitle is None or sTitle == refTitle): - theRefs[aTag[1]].append(aTag[2]) + if aTag[1] in theRefs: # Future-compatible. Check can be removed in 1.2. + theRefs[aTag[1]].append(aTag[2]) return theRefs