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

update routing

This commit is contained in:
Luke Pulverenti 2016-03-16 14:27:50 -04:00
parent d421bfda20
commit 59b578e8fe
2 changed files with 13 additions and 11 deletions

View file

@ -16,12 +16,12 @@
}, },
"devDependencies": {}, "devDependencies": {},
"ignore": [], "ignore": [],
"version": "1.1.70", "version": "1.1.71",
"_release": "1.1.70", "_release": "1.1.71",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "1.1.70", "tag": "1.1.71",
"commit": "d1fb54ac22cb5fab3fbd5622ddeb635685cd1337" "commit": "d908b2813ab510b2059a80a2d0ec0d1bf0eca6d9"
}, },
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git", "_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "~1.1.5", "_target": "~1.1.5",

View file

@ -335,18 +335,20 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
} }
function getRequestFile() { function getRequestFile() {
var path = window.location.pathname; var path = window.location.pathname || '';
if (path == '/') {
path = '/index.html';
}
var index = path.lastIndexOf('/'); var index = path.lastIndexOf('/');
if (index != -1) { if (index != -1) {
return path.substring(index); path = path.substring(index);
} else {
path = '/' + path;
} }
return '/' + path; if (!path || path == '/') {
path = '/index.html';
}
return path;
} }
var baseRoute = window.location.href.split('?')[0].replace(getRequestFile(), ''); var baseRoute = window.location.href.split('?')[0].replace(getRequestFile(), '');