@bigbinary/neeto-commons-frontend 2.0.114 → 2.0.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-commons-frontend",
3
- "version": "2.0.114",
3
+ "version": "2.0.116",
4
4
  "description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
5
5
  "repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",
@@ -3542,8 +3542,13 @@ var useKeyboardShortcutsPaneState = function useKeyboardShortcutsPaneState() {
3542
3542
  };
3543
3543
 
3544
3544
  var getStorageValue = function getStorageValue(key, defaultValue) {
3545
- if (key in localStorage) return JSON.parse(localStorage.getItem(key));
3546
- return defaultValue;
3545
+ try {
3546
+ var storedValue = localStorage.getItem(key);
3547
+ return storedValue ? JSON.parse(storedValue) : defaultValue;
3548
+ } catch (error) {
3549
+ logger.error(error);
3550
+ return defaultValue;
3551
+ }
3547
3552
  };
3548
3553
  var useLocalStorage = function useLocalStorage(key, defaultValue) {
3549
3554
  var _useState = React.useState(function () {