Skip to content

Commit

Permalink
Restoring module initialization mechanism (for modules that have not …
Browse files Browse the repository at this point in the history
…only the index)
  • Loading branch information
sashuk committed Sep 26, 2018
1 parent 09d81de commit 1906d63
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions browser/modules/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,12 @@ module.exports = {
let enabledExtensionsCopy = JSON.parse(JSON.stringify(window.vidiConfig.enabledExtensions));
$.each(vidiConfig.extensions.browser, function (i, v) {
$.each(v[Object.keys(v)[0]], function (n, m) {
let enabledExtensionIndex = enabledExtensionsCopy.indexOf(Object.keys(v)[0]);
if (enabledExtensionIndex > -1) {
if (window.vidiConfig.enabledExtensions.indexOf(Object.keys(v)[0]) > -1) {
modules.extensions[Object.keys(v)[0]][m].init();
enabledExtensionsCopy.splice(enabledExtensionIndex, 1);
let enabledExtensionIndex = enabledExtensionsCopy.indexOf(Object.keys(v)[0]);
if (enabledExtensionIndex > -1) {
enabledExtensionsCopy.splice(enabledExtensionIndex, 1);
}
}
})
});
Expand Down

0 comments on commit 1906d63

Please sign in to comment.