diff --git a/CHANGELOG.md b/CHANGELOG.md index 38bfe750..e0eb39f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -225,7 +225,7 @@ _These Release Notes also include the changes from 1.1 RC 1._ **Bugfixes** * A `None` check in the details panel below the project tree was missing, resulting in an - occasional error message being printed to the logging output. The error was otherwise handles, so + occasional error message being printed to the logging output. The error was otherwise handled, so this is mainly a fix to prevent the error message. PR #639. **User Interface** diff --git a/nw/core/index.py b/nw/core/index.py index c74bff35..ff790022 100644 --- a/nw/core/index.py +++ b/nw/core/index.py @@ -469,9 +469,17 @@ class NWIndex(): return False sTitle = "T%06d" % nTitle - if sTitle in self._refIndex[tHandle] and theBits[0] != nwKeyWords.TAG_KEY: - for aVal in theBits[1:]: - self._refIndex[tHandle][sTitle]["tags"].append([nLine, theBits[0], aVal]) + if sTitle not in self._refIndex[tHandle]: + return False + + if theBits[0] == nwKeyWords.TAG_KEY: + return False + + if theBits[0] not in nwKeyWords.VALID_KEYS: + return False + + for aVal in theBits[1:]: + self._refIndex[tHandle][sTitle]["tags"].append([nLine, theBits[0], aVal]) return True