From 570937d8f78813814e9f6a7a07acf5037c6131e6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 1 Nov 2021 22:50:26 +0000 Subject: [PATCH] Check that emoji dict was loaded --- content.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content.py b/content.py index 360920f90..ac281212f 100644 --- a/content.py +++ b/content.py @@ -904,8 +904,9 @@ def addHtmlTags(baseDir: str, httpPrefix: str, if os.path.isfile(baseDir + '/emojicustom/emoji.json'): customEmojiDict = \ loadJson(baseDir + '/emojicustom/emoji.json') - emojiDict = \ - dict(emojiDict.items() + customEmojiDict.items()) + if customEmojiDict: + emojiDict = \ + dict(emojiDict.items() + customEmojiDict.items()) # print('TAG: looking up emoji for :' + wordStr2 + ':') _addEmoji(baseDir, ':' + wordStr2 + ':', httpPrefix,