mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-05 20:34:15 +02:00
Fix retrieving parent documents when the model is null
This commit is contained in:
parent
905d1f7e88
commit
41a99cb8ea
1 changed files with 1 additions and 0 deletions
|
|
@ -171,6 +171,7 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
|
|||
|
||||
/** Recursively finds the first parent document of the given object */
|
||||
static #resolveParentDocument(model, documentClass) {
|
||||
if (!model) return null;
|
||||
return model instanceof documentClass
|
||||
? model
|
||||
: model.parent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue