mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
Update src/components/appRouter.js
Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
This commit is contained in:
parent
2015665a64
commit
138e8460f6
@ -314,17 +314,18 @@ class AppRouter {
|
||||
url += '?' + ctx.querystring;
|
||||
}
|
||||
|
||||
let promise;
|
||||
if (route.serverRequest) {
|
||||
const apiClient = ServerConnections.currentApiClient();
|
||||
|
||||
url = apiClient.getUrl(`/web${url}`);
|
||||
|
||||
apiClient.get(url).then(html => this.loadContent(ctx, route, html, request));
|
||||
promise = apiClient.get(url);
|
||||
} else {
|
||||
import(/* webpackChunkName: "[request]" */ `../controllers/${url}`).then((html) => {
|
||||
this.loadContent(ctx, route, html, request);
|
||||
});
|
||||
promise = import(/* webpackChunkName: "[request]" */ `../controllers/${url}`);
|
||||
}
|
||||
|
||||
promise.then((html) => {
|
||||
this.loadContent(ctx, route, html, request);
|
||||
});
|
||||
}
|
||||
|
||||
handleRoute(ctx, next, route) {
|
||||
|
Loading…
Reference in New Issue
Block a user