[Fix] 1548 - Standalone Item Add Actions (#1549)

* Fixed so that items not on an actor don't error out on creating actions

* Fixed deletion of items error
This commit is contained in:
WBHarry 2026-01-16 21:37:04 +01:00 committed by GitHub
parent 22383613f1
commit 07bdd48199
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View file

@ -240,7 +240,7 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
game.system.registeredTriggers.unregisterTriggers(triggersToRemove, this.parent.uuid);
if (!(this.parent.parent.token instanceof game.system.api.documents.DhToken)) {
if (this.parent.parent && !(this.parent.parent.token instanceof game.system.api.documents.DhToken)) {
for (const token of this.parent.parent.getActiveTokens()) {
game.system.registeredTriggers.unregisterTriggers(
triggersToRemove,