diff --git a/client/src/components/info.component.jsx b/client/src/components/info.component.jsx index aa28d4a8..317fccb8 100644 --- a/client/src/components/info.component.jsx +++ b/client/src/components/info.component.jsx @@ -20,6 +20,7 @@ function Info(args) { } = args; function CrypVar() { + if (!info) return false; const [type, value] = info; if (!type) return false; @@ -42,6 +43,10 @@ function Info(args) { } else if (COLOURS[value]) { itemDetails = COLOURS[value]; } + + if (!itemDetails) { + return console.warn('UNHANLDED VAR', value); + } return (
{value} - {itemDetails.description} diff --git a/client/src/events.jsx b/client/src/events.jsx index 869b91e5..29ffe914 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -96,7 +96,7 @@ function registerEvents(store) { } function clearCombiner() { - store.dispatch(actions.setInfo(null)); + store.dispatch(actions.setInfo([])); store.dispatch(actions.setCombiner([null, null, null])); } diff --git a/client/src/reducers.jsx b/client/src/reducers.jsx index c3976725..bd0fd4ad 100644 --- a/client/src/reducers.jsx +++ b/client/src/reducers.jsx @@ -194,6 +194,7 @@ const defaultInfo = [null, null]; function infoReducer(state = defaultInfo, action) { switch (action.type) { case actions.SET_INFO: + if (!action.value) debugger return action.value; default: return state;