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;
}
function getViewEventDetail(view, options, isRestore) {
const url = options.url;
function getViewEventDetail(view, {state, url, options = {}}, isRestored) {
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 {
detail: {
type: view.getAttribute('data-type'),
properties: getProperties(view),
params: params,
isRestored: isRestore,
state: options.state,
params,
isRestored,
state,
// The route options
options: options.options || {}
options
},
bubbles: true,
cancelable: false