From 4974482325e08a2926294d7d1924b6333ae85ff8 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Thu, 23 Sep 2021 12:45:53 +0200 Subject: [PATCH] fix: fix effects not being surpressed for unlinked token actors --- src/module/active-effect.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/module/active-effect.ts b/src/module/active-effect.ts index 3d3432fc..08925178 100644 --- a/src/module/active-effect.ts +++ b/src/module/active-effect.ts @@ -43,7 +43,8 @@ export class DS4ActiveEffect extends ActiveEffect { if (!(this.parent instanceof DS4Actor)) { return; } - const [, , , itemId] = this.data.origin?.split(".") ?? []; + const itemIdRegex = /Item\.([a-zA-Z0-9]+)/; + const itemId = this.data.origin?.match(itemIdRegex)?.[1]; if (!itemId) { return; }