mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Merge pull request #3872 from GochoMugo/fix/denied-storage-access
fix: handle denied storage access
This commit is contained in:
commit
17d24bf8e2
1 changed files with 7 additions and 1 deletions
|
|
@ -12,7 +12,13 @@
|
|||
if (!currentScript) return;
|
||||
|
||||
const { hostname, href, origin } = location;
|
||||
const localStorage = href.startsWith('data:') ? undefined : window.localStorage;
|
||||
|
||||
let localStorage;
|
||||
try {
|
||||
localStorage = href.startsWith('data:') ? undefined : window.localStorage;
|
||||
} catch {
|
||||
/* (DOMException) SecurityError: Access is denied for this document. */
|
||||
}
|
||||
|
||||
const _data = 'data-';
|
||||
const _false = 'false';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue