From b5683ba4b834f8eb0b1b20f9cf3c83a84db01bf7 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Tue, 17 Dec 2024 20:53:54 +0000 Subject: [PATCH] fix(jellyfin): Fix missing check for undefined play #239 --- src/core/Atomic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Atomic.ts b/src/core/Atomic.ts index 1b6c45b..b1ca175 100644 --- a/src/core/Atomic.ts +++ b/src/core/Atomic.ts @@ -175,7 +175,7 @@ export interface AmbPlayObject { } export const isPlayObject = (obj: object): obj is PlayObject => { - return 'data' in obj && typeof obj.data === 'object' && 'meta' in obj && typeof obj.meta === 'object'; + return obj !== undefined && obj !== null && 'data' in obj && typeof obj.data === 'object' && 'meta' in obj && typeof obj.meta === 'object'; } export interface PlayObject extends AmbPlayObject {