From 7522679dcd3fdf62b4768f6325365a697c1566d9 Mon Sep 17 00:00:00 2001 From: Surge Date: Thu, 2 Mar 2023 13:08:55 -0500 Subject: [PATCH] patch: fix bug with opening default token settings --- src/module/patch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module/patch.js b/src/module/patch.js index a1fc107..ff43e2e 100644 --- a/src/module/patch.js +++ b/src/module/patch.js @@ -131,7 +131,7 @@ function patchResourceBars() { "wjmais", "game.dnd5e.documents.TokenDocument5e.prototype.getBarAttribute", function (wrapped, ...args) { - if (game.actors.get(this.actorId).flags?.wjmais?.traits) + if (game.actors.get(this.actorId)?.flags?.wjmais?.traits) return Object.getPrototypeOf( game.dnd5e.documents.TokenDocument5e ).prototype.getBarAttribute.apply(this, args);