mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-19 00:19:03 +01:00
Merge branch 'main' into feature/death-moves
This commit is contained in:
commit
a071626e43
5 changed files with 5 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ export default class RegisteredTriggers extends Map {
|
|||
|
||||
unregisterItemTriggers(items) {
|
||||
for (const item of items) {
|
||||
if (!item.system.actions.size) continue;
|
||||
if (!item.system.actions?.size) continue;
|
||||
|
||||
const triggers = (item.system.actions ?? []).reduce((acc, action) => {
|
||||
acc.push(...action.triggers.map(x => x.trigger));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue