mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Shorten localStorage check.
This commit is contained in:
parent
194983fa7d
commit
4a08249e30
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.sass-cache
|
.sass-cache
|
||||||
.idea/
|
.idea/
|
||||||
node_modules/
|
node_modules/
|
||||||
|
tmp/
|
||||||
|
@ -41,7 +41,7 @@ const DEFAULT_DEFAULT_PRESET_NAME = 'Default';
|
|||||||
|
|
||||||
const SUPPORTS_LOCAL_STORAGE = (function() {
|
const SUPPORTS_LOCAL_STORAGE = (function() {
|
||||||
try {
|
try {
|
||||||
return 'localStorage' in window && window.localStorage !== null && window.localStorage !== undefined;
|
return !!window.localStorage;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user