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

14 lines
337 B
TypeScript
Raw Normal View History

export const getWindowLocationSearch = (win: Window | null | undefined) => {
let search = (win || window).location.search;
if (!search) {
const index = window.location.href.indexOf('?');
if (index != -1) {
search = window.location.href.substring(index);
}
}
return search || '';
};