mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 07:07:17 +01:00
Added segment filtering to filter form.
This commit is contained in:
parent
2e69e57445
commit
2ad624ccc8
15 changed files with 301 additions and 193 deletions
|
|
@ -9,7 +9,11 @@ export function getItem(key: string, session?: boolean): any {
|
|||
const value = (session ? sessionStorage : localStorage).getItem(key);
|
||||
|
||||
if (value !== 'undefined' && value !== null) {
|
||||
return JSON.parse(value);
|
||||
try {
|
||||
return JSON.parse(value);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue