From 4a08249e30b3838292af2a54789e047f5e08d771 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Sat, 28 Apr 2018 14:08:47 -0700 Subject: [PATCH] Shorten localStorage check. --- .gitignore | 3 ++- src/dat/gui/GUI.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b4a8af4..516a13d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store .sass-cache .idea/ -node_modules/ \ No newline at end of file +node_modules/ +tmp/ diff --git a/src/dat/gui/GUI.js b/src/dat/gui/GUI.js index 471e0b5..a0e6f04 100644 --- a/src/dat/gui/GUI.js +++ b/src/dat/gui/GUI.js @@ -41,7 +41,7 @@ const DEFAULT_DEFAULT_PRESET_NAME = 'Default'; const SUPPORTS_LOCAL_STORAGE = (function() { try { - return 'localStorage' in window && window.localStorage !== null && window.localStorage !== undefined; + return !!window.localStorage; } catch (e) { return false; }