mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 04:44:16 +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 */
|
/** Recursively finds the first parent document of the given object */
|
||||||
static #resolveParentDocument(model, documentClass) {
|
static #resolveParentDocument(model, documentClass) {
|
||||||
|
if (!model) return null;
|
||||||
return model instanceof documentClass
|
return model instanceof documentClass
|
||||||
? model
|
? model
|
||||||
: model.parent
|
: model.parent
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue