mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Split only on first comma in media browser (#12331)
This commit is contained in:
parent
30b130ca74
commit
7723d47ac1
@ -170,11 +170,12 @@ class PanelMediaBrowser extends LitElement {
|
||||
media_content_id: undefined,
|
||||
},
|
||||
...navigateIdsEncoded.map((navigateId) => {
|
||||
const [media_content_type, media_content_id] =
|
||||
decodeURIComponent(navigateId).split(",");
|
||||
const decoded = decodeURIComponent(navigateId);
|
||||
// Don't use split because media_content_id could contain commas
|
||||
const delimiter = decoded.indexOf(",");
|
||||
return {
|
||||
media_content_type,
|
||||
media_content_id,
|
||||
media_content_type: decoded.substring(0, delimiter),
|
||||
media_content_id: decoded.substring(delimiter + 1),
|
||||
};
|
||||
}),
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user