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 (#1853)
This commit is contained in:
parent
d0c2c783f1
commit
c7159eff11
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