mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 02:36:00 +00:00
collapsed left column - moved from settings to storage
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const cache = {};
|
||||
|
||||
export function getLocalStorage(key) {
|
||||
export function getLocalStorage(key, defaultValue = undefined) {
|
||||
if (key in cache) return cache[key];
|
||||
const item = localStorage.getItem(key);
|
||||
if (item) {
|
||||
@@ -8,7 +8,7 @@ export function getLocalStorage(key) {
|
||||
cache[key] = res;
|
||||
return res;
|
||||
}
|
||||
return undefined;
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
export function setLocalStorage(key, value) {
|
||||
|
||||
Reference in New Issue
Block a user