repo: janusweb action: commit revision: path_from: revision_from: 4e3ee5f741aebc2260437378d97f9f952ea5048b: path_to: revision_to:
commit 4e3ee5f741aebc2260437378d97f9f952ea5048b Author: James BaicoianuDate: Sun Apr 24 00:16:03 2022 -0700 Gracefully handle missing localStorage diff --git a/scripts/janusplayer.js b/scripts/janusplayer.js
--- a/scripts/janusplayer.js
+++ b/scripts/janusplayer.js
@@ -18,7 +18,11 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt
this.postinit = function() {
elation.engine.things.janusplayer.extendclass.postinit.call(this);
- this.settings = elation.collection.localindexed({storagekey: 'janusweb.player.settings', index: 'key'});
+ try {
+ this.settings = elation.collection.localindexed({storagekey: 'janusweb.player.settings', index: 'key'});
+ } catch (e) {
+ this.settings = elation.collection.indexed({storagekey: 'janusweb.player.settings', index: 'key'});
+ }
this.defineProperties({
janus: {type: 'object' },
-----END OF PAGE-----