Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
398
Merge Requests
53
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
80e43c8c
Commit
80e43c8c
authored
2 hours ago
by
Mark Harding
Browse files
Options
Download
(fix): possible fix for localstorage access sentry FRONT-52
parent
6ad11c19
master
No related merge requests found
Pipeline
#100275752
waiting for manual action with stages
in 50 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
src/app/services/storage.ts
View file @
80e43c8c
...
...
@@ -4,7 +4,14 @@ export class Storage {
}
get
(
key
:
string
)
{
return
window
.
localStorage
.
getItem
(
key
);
try
{
return
window
.
localStorage
.
getItem
(
key
);
}
catch
(
err
)
{
// We are catching here as some browser block localstorege.
// TODO: Extend to .set and .destroy once this is verified as fix
console
.
log
(
err
);
return
null
;
}
}
set
(
key
:
string
,
value
:
any
)
{
return
window
.
localStorage
.
setItem
(
key
,
value
);
...
...
This diff is collapsed.
Please
register
or
sign in
to comment