mirror of
https://github.com/brianlovin/security-checklist.git
synced 2026-03-11 08:55:31 +00:00
Fixed warning “React a component is changing an uncontrolled input of type checkbox to be controlled”
This commit is contained in:
parent
9749603acd
commit
419f8d88b9
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue