mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Refactor isEnabled function to always return boolean
This commit is contained in:
parent
37fd4feb55
commit
4dd8d7e73f
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ export function isEnabled() {
|
||||||
const playerId = localStorage.getItem('autocastPlayerId');
|
const playerId = localStorage.getItem('autocastPlayerId');
|
||||||
const currentPlayerInfo = playbackManager.getPlayerInfo();
|
const currentPlayerInfo = playbackManager.getPlayerInfo();
|
||||||
|
|
||||||
return (currentPlayerInfo && playerId && currentPlayerInfo.id === playerId);
|
return currentPlayerInfo?.id === playerId
|
||||||
}
|
}
|
||||||
|
|
||||||
function onOpen() {
|
function onOpen() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue