chore: tidy

This commit is contained in:
cha0s 2019-10-16 02:20:36 -05:00
parent b07803a308
commit f9ac15f817

View File

@ -50,8 +50,9 @@ export class Vulnerable extends Trait {
this._isHydrating = false;
this._isInvulnerable = false;
this.locks = new Map();
const tookDamageActionsJSON = this.params.tookDamageActions;
this._tookDamageActions = behaviorItemFromJSON(tookDamageActionsJSON);
this._tookDamageActions = behaviorItemFromJSON(
this.params.tookDamageActions
);
}
destroy() {
@ -72,9 +73,7 @@ export class Vulnerable extends Trait {
damage,
entity: this.entity,
});
const tickingPromise = this._tookDamageActions.tickingPromise(
context
);
const tickingPromise = this._tookDamageActions.tickingPromise(context);
tickingPromise.then(() => {
context.destroy();
});