fix: eslint errors and warnings (#8149)
This commit is contained in:
parent
83fdebf64d
commit
8307badae5
137 changed files with 97 additions and 216 deletions
|
|
@ -5,7 +5,7 @@ export const getValueFromLocalStorage = (key: string, defaultValue: any) => {
|
|||
try {
|
||||
const item = window.localStorage.getItem(key);
|
||||
return item ? JSON.parse(item) : defaultValue;
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
window.localStorage.removeItem(key);
|
||||
return defaultValue;
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ export const setValueIntoLocalStorage = (key: string, value: any) => {
|
|||
try {
|
||||
window.localStorage.setItem(key, JSON.stringify(value));
|
||||
return true;
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue