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

Fix dependency loop

This commit is contained in:
Dmitry Lyzo 2020-05-20 00:35:19 +03:00
parent 58b776dc43
commit 29b9dac5f4

View file

@ -1,4 +1,4 @@
define(['events', 'globalize', 'appRouter'], function (events, globalize, appRouter) {
define(['events', 'globalize'], function (events, globalize) {
'use strict';
// TODO: replace with each plugin version
@ -71,14 +71,6 @@ define(['events', 'globalize', 'appRouter'], function (events, globalize, appRou
plugin.installUrl = pluginSpec;
var urlLower = pluginSpec.toLowerCase();
if (urlLower.indexOf('http:') === -1 && urlLower.indexOf('https:') === -1 && urlLower.indexOf('file:') === -1) {
if (pluginSpec.indexOf(appRouter.baseUrl()) !== 0) {
pluginSpec = appRouter.baseUrl() + '/' + pluginSpec;
}
}
var separatorIndex = Math.max(pluginSpec.lastIndexOf('/'), pluginSpec.lastIndexOf('\\'));
plugin.baseUrl = pluginSpec.substring(0, separatorIndex);