From 1d778ecc17da2ca660590b280ebdebe0ec555877 Mon Sep 17 00:00:00 2001 From: Mashy Date: Fri, 20 Sep 2019 16:44:14 +1000 Subject: [PATCH] null animTarget bug --- client/src/events.jsx | 4 ++-- client/src/utils.jsx | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/events.jsx b/client/src/events.jsx index f088c057..17851207 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -87,12 +87,12 @@ function registerEvents(store) { ); } return setTimeout(() => { + const animSkill = anims.animTarget ? removeTier(anims.animTarget.skill) : false; store.dispatch(actions.setAnimSource(null)); store.dispatch(actions.setAnimTarget(null)); store.dispatch(actions.setAnimText(null)); store.dispatch(actions.setAnimFocus([])); - if (!sequence.includes('END_SKILL' && anims.animTarget) - || ['Banish', 'Invert'].includes(removeTier(anims.animTarget.skill))) return cb(); + if (!sequence.includes('END_SKILL') || (animSkill && ['Banish', 'Invert'].includes(animSkill))) return cb(); return true; }, timeout); }, err => { diff --git a/client/src/utils.jsx b/client/src/utils.jsx index b829eb94..b78a2b44 100644 --- a/client/src/utils.jsx +++ b/client/src/utils.jsx @@ -250,6 +250,5 @@ module.exports = { TARGET_COLOURS, randomPoints, removeTier, - itemSpeed, match, };