From e8e8124ba72e82d13cfb28e7359a4c1e823d4c07 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Wed, 4 Jun 2025 12:13:16 +0300 Subject: [PATCH] FIx observable checking Fixes #214 --- package.json | 4 ++-- source/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index bcbc532..a9f708e 100644 --- a/package.json +++ b/package.json @@ -62,8 +62,8 @@ "jsdom": "^24.1.0", "rxjs": "^7.8.1", "tempy": "^3.1.0", - "tsimp": "^2.0.11", - "typescript": "^5.5.3", + "tsimp": "2.0.11", + "typescript": "5.5.3", "xo": "^0.58.0", "zen-observable": "^0.10.0" }, diff --git a/source/index.ts b/source/index.ts index 5913d7a..bb30c0b 100644 --- a/source/index.ts +++ b/source/index.ts @@ -629,7 +629,7 @@ export function isObservable(value: unknown): value is ObservableLike { } // eslint-disable-next-line no-use-extend-native/no-use-extend-native, @typescript-eslint/no-unsafe-call - if (value === (value as any)[Symbol.observable]?.()) { + if (Symbol.observable !== undefined && value === (value as any)[Symbol.observable]?.()) { return true; }