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

fix string params for controllers

This commit is contained in:
vitorsemeano 2020-10-12 21:39:55 +01:00
parent 85acdb3868
commit 3b960e44f3

View file

@ -97,21 +97,24 @@ function dispatchViewEvent(view, eventInfo, eventName, isCancellable) {
return eventResult; return eventResult;
} }
function getViewEventDetail(view, options, isRestore) { function getViewEventDetail(view, {state, url, options = {}}, isRestored) {
const url = options.url;
const index = url.indexOf('?'); const index = url.indexOf('?');
const params = new URLSearchParams(url.substring(index + 1)); const searchParams = new URLSearchParams(url.substring(index + 1));
const params = {};
searchParams.forEach((value, key) =>
params[key] = value
);
return { return {
detail: { detail: {
type: view.getAttribute('data-type'), type: view.getAttribute('data-type'),
properties: getProperties(view), properties: getProperties(view),
params: params, params,
isRestored: isRestore, isRestored,
state: options.state, state,
// The route options // The route options
options: options.options || {} options
}, },
bubbles: true, bubbles: true,
cancelable: false cancelable: false