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 {