fix: from isn't guaranteed

This commit is contained in:
cha0s 2021-01-22 19:23:09 -06:00
parent 11dbddd47b
commit c1c936b16b

View File

@ -28,7 +28,7 @@ export default (latus) => class Vulnerable extends Trait {
}, },
latus, latus,
); );
if (from.is('Emitter')) { if (from && from.is('Emitter')) {
from.emitParticle('harmful'); from.emitParticle('harmful');
} }
this.interactions(this.entity, affinity, context, 'client'); this.interactions(this.entity, affinity, context, 'client');