mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 22:46:12 +01:00
Fixed the rest
This commit is contained in:
parent
ee89d5cb9e
commit
b1f2bdbee5
4 changed files with 31 additions and 32 deletions
|
|
@ -72,26 +72,6 @@ export default class DHDomainCard extends BaseDataItem {
|
|||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**@inheritdoc */
|
||||
async _preUpdate(data, options, user) {
|
||||
const allowed = await super._preUpdate(data, options, user);
|
||||
if (allowed === false) return;
|
||||
|
||||
if (this.parent.parent?.type === 'character') {
|
||||
if (
|
||||
data.system?.inVault &&
|
||||
!this.inVault &&
|
||||
this.parent.parent.system.sidebarFavorites.find(x => x?.id === this.parent.id)
|
||||
) {
|
||||
this.parent.parent.update({
|
||||
'system.sidebarFavorites': this.parent.parent.system.sidebarFavorites.filter(
|
||||
x => x.id !== this.parent.id
|
||||
)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**@inheritdoc */
|
||||
async _preCreate(data, options, user) {
|
||||
const allowed = await super._preCreate(data, options, user);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue