Commit c5c973ec authored by Mattias J Duffy's avatar Mattias J Duffy
Browse files

fixing noisy localstorage error

parent b90dfd28
Pipeline #1856 passed with stage
in 1 minute and 41 seconds
......@@ -36,7 +36,9 @@ export const getFacilities = () => dispatch => {
};
export const setFacilities = (facilities) => {
localStorage.setItem('facilities', facilities);
try{
localStorage.setItem('facilities', facilities);
}catch(e){}
return {
type: SET_FACILITIES,
facilities: JSON.parse(facilities)
......
......@@ -22,7 +22,6 @@ class Layout extends React.Component {
are any updates.
*/
try {
localStorage = window.localStorage;
if (localStorage.getItem('facilities')) {
const facilities = localStorage.getItem('facilities');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment