mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-11 18:33:53 +00:00
fix: storage key conflict across stages
This commit is contained in:
committed by
Carlos Valente
parent
efceb930e5
commit
617da68ab5
@@ -1,3 +1,5 @@
|
||||
import { baseURI } from '../../externals';
|
||||
|
||||
export function booleanFromLocalStorage(key: string, fallback: boolean): boolean {
|
||||
const valueInStorage = localStorage.getItem(key);
|
||||
if (valueInStorage) {
|
||||
@@ -7,3 +9,8 @@ export function booleanFromLocalStorage(key: string, fallback: boolean): boolean
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
|
||||
export function makeStageKey(key: string) {
|
||||
if (baseURI) return `${baseURI}-${key}`;
|
||||
return key;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user