1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix errors in controller imports

This commit is contained in:
Bill Thornton 2020-09-08 02:26:20 -04:00 committed by vitorsemeano
parent a71b0314d4
commit 88d0c11209
6 changed files with 31 additions and 33 deletions

View file

@ -7,9 +7,7 @@ function onListingsSubmitted() {
}
function init(page, type, providerId) {
const url = 'components/tvproviders/' + type + '.js';
import(url).then(({default: factory}) => {
import(`../components/tvproviders/${type}`).then(({default: factory}) => {
const instance = new factory(page, providerId, {});
Events.on(instance, 'submitted', onListingsSubmitted);
instance.init();
@ -17,7 +15,7 @@ function init(page, type, providerId) {
}
function loadTemplate(page, type, providerId) {
import('./../components/tvproviders/' + type + '.template.html').then(({default: html}) => {
import(`../components/tvproviders/${type}.template.html`).then(({default: html}) => {
page.querySelector('.providerTemplate').innerHTML = globalize.translateHtml(html);
init(page, type, providerId);
});