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

Update src/plugins/chromecastPlayer/plugin.js

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
Sky High 2023-10-25 23:30:39 +02:00 committed by Bill Thornton
parent 4257a401d5
commit 86beb0e7e5

View file

@ -510,7 +510,7 @@ function bindEventForRelay(instance, eventName) {
Events.on(instance._castPlayer, eventName, function (e, data) {
console.debug('[chromecastPlayer] ' + eventName);
// skip events without data
if (data && data.ItemId !== '' ) {
if (data?.ItemId) {
const state = instance.getPlayerStateInternal(data);
Events.trigger(instance, eventName, [state]);
}