From 2191bbc24e0af23f29018dba95fd3081407517d9 Mon Sep 17 00:00:00 2001 From: Jonas Karlsson Date: Sun, 11 Sep 2022 15:47:47 +0200 Subject: [PATCH] Fix errors due to not all messages having token set (i.e. some messages PF2e Workbench generates) --- scripts/dorako-ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dorako-ui.js b/scripts/dorako-ui.js index 78c2392..09e84b2 100644 --- a/scripts/dorako-ui.js +++ b/scripts/dorako-ui.js @@ -404,8 +404,8 @@ function addAvatarsToFlags(message) { let userImg = message.user?.avatar; console.log(message.token); - console.log(message.token.texture); - console.log(message.token.texture.src); + console.log(message.token?.texture); + console.log(message.token?.texture.src); let userAvatar = new Avatar(message.speaker.alias, userImg);