Skip to content

Commit

Permalink
📦 Working build
Browse files Browse the repository at this point in the history
No known bugs. Closes #37.
  • Loading branch information
blahsd committed Jul 6, 2018
1 parent 5481bf0 commit a34dd70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion app/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ var utils = require( path.resolve( __dirname, 'js/require/utils.js'));

window.onload=function() {
window.$ = window.jQuery = require('jquery');
utils.loadSettings(document, ["theme", "colorscheme","player"]);
try {
utils.loadSettings(document, ["theme", "colorscheme","player"]);
} catch (e) {
console.log("Error loading settings. I'll try re-initializing them");
utils.initializeSettings();
utils.loadSettings(document, ["theme", "colorscheme","player"]);
}
utils.moduleManager.initializeModules();
utils.moduleManager.loadModules(utils.store.get("modules"));
};
2 changes: 1 addition & 1 deletion app/js/require/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ module.exports = {
let externalModule = new ExternalModule(store.get(settings[i]), settings[i]);
externalModule.loadIn(element);
} catch (e) {
// Settings have not been ini tialised
// Settings have not been initialised
module.exports.initializeSettings();
module.exports.loadSettings();
}
Expand Down

0 comments on commit a34dd70

Please sign in to comment.