Fixed warning “React a component is changing an uncontrolled input of type checkbox to be controlled”

This commit is contained in:
Joachim Robert 2019-02-06 19:28:02 +01:00
parent 9749603acd
commit 419f8d88b9

View file

@ -2,7 +2,7 @@ export const getItemFromStorage = key => {
if (!localStorage) return;
try {
return JSON.parse(localStorage.getItem(key));
return JSON.parse(localStorage.getItem(key) || false);
} catch (err) {}
};