From 1a53e34290283ed07271d6d4f7aa1aed195c75e8 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 29 Jan 2023 23:43:24 -0800 Subject: [PATCH] Always run npm run build --- components/WeaponGrid/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/WeaponGrid/index.tsx b/components/WeaponGrid/index.tsx index f5dc668c..c569be5a 100644 --- a/components/WeaponGrid/index.tsx +++ b/components/WeaponGrid/index.tsx @@ -95,13 +95,15 @@ const WeaponGrid = (props: Props) => { const payload: DetailsObject = { extra: party.extra } props.createParty(payload).then((team) => { saveWeapon(team.id, weapon, position).then((response) => { - storeGridWeapon(response.data.grid_weapon) + if (response) storeGridWeapon(response.data.grid_weapon) }) }) } else { if (party.editable) saveWeapon(party.id, weapon, position) - .then((response) => handleWeaponResponse(response.data)) + .then((response) => { + if (response) handleWeaponResponse(response.data) + }) .catch((error) => { const axiosError = error as AxiosError const response = axiosError.response