Remove unused data field file
This commit is contained in:
parent
5d951d043b
commit
9a92c288a6
1 changed files with 0 additions and 29 deletions
|
|
@ -1,29 +0,0 @@
|
|||
/**
|
||||
* This data field functions the same way as Foundry's ObjectField
|
||||
* however it permits changes to internal properties to be tracked in
|
||||
* a diff, without committing those changes to the database unless it's
|
||||
* removing the entire object.
|
||||
*/
|
||||
export class EphemeralObjectField extends foundry.data.fields.ObjectField {
|
||||
|
||||
/**
|
||||
* Inverting the defaults from ObjectField since we don't want it to
|
||||
* be stored in the database anyway
|
||||
*/
|
||||
static get _defaults() {
|
||||
return Object.assign(super._defaults, { required: false, nullable: true });
|
||||
};
|
||||
|
||||
/**
|
||||
* When trying to diff the object, only allow deletions to go through,
|
||||
* otherwise ignore it entirely
|
||||
*/
|
||||
_updateDiff(key, value, options, state) {
|
||||
if (
|
||||
!value
|
||||
|| (value instanceof foundry.data.operators.ForcedDeletion)
|
||||
) {
|
||||
return super._updateDiff(key, value, options, state);
|
||||
};
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue