mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fix JS errors
Weirdly, I didn't see them in the console before...
This commit is contained in:
@@ -62,8 +62,8 @@
|
||||
|
||||
static enable(elementOrId, enableElement = true) {
|
||||
let element = elementOrId;
|
||||
if (element instanceof String) {
|
||||
element = document.getElementById('element');
|
||||
if (typeof element === 'string' || element instanceof String) {
|
||||
element = document.getElementById(element);
|
||||
}
|
||||
|
||||
if (enableElement) {
|
||||
|
||||
@@ -501,11 +501,11 @@ function onSearchEnd(evt) {
|
||||
document.getElementById('mainToolbar').classList.remove('search');
|
||||
}
|
||||
function onFolderChange(evt) {
|
||||
loot.dom.updateSelectedGame(evt.detail.folder);
|
||||
loot.DOM.updateSelectedGame(evt.detail.folder);
|
||||
/* Enable/disable the redate plugins option. */
|
||||
let gameSettings = undefined;
|
||||
if (loot.settings && loot.settings.games) {
|
||||
gameSettings = loot.settings.games.find(game => game.folder === evt.detail.folder);
|
||||
}
|
||||
loot.dom.enable('redatePluginsButton', gameSettings && gameSettings.type === 'Skyrim');
|
||||
loot.DOM.enable('redatePluginsButton', gameSettings && gameSettings.type === 'Skyrim');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user