Get the plugin card list directly

Don't get its parent then the lastElementChild, that's more prone to
breaking.
This commit is contained in:
Oliver Hamlet
2016-03-05 11:49:26 +00:00
parent 37163a77d3
commit 3966d2269e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ function onChangeGame(evt) {
/* Reset virtual list positions. */
document.getElementById('cardsNav').scrollToIndex(0);
document.getElementById('main').lastElementChild.scrollToIndex(0);
document.getElementById('pluginCardList').scrollToIndex(0);
/* Now update virtual lists. */
filterPluginData(loot.game.plugins, loot.filters);
+1 -1
View File
@@ -223,7 +223,7 @@
const game = JSON.parse(result, Plugin.fromJson);
appData.game = new Game(game, appData.l10n);
document.getElementById('cardsNav').items = appData.game.plugins;
document.getElementById('main').lastElementChild.items = appData.game.plugins;
document.getElementById('pluginCardList').items = appData.game.plugins;
applyEnabledFilters(appData.filters, appData.settings, appData.game.plugins);
Dialog.closeProgress();
});