FIx observable checking

Fixes #214
This commit is contained in:
Sindre Sorhus 2025-06-04 12:13:16 +03:00
parent 47a5099325
commit e8e8124ba7
2 changed files with 3 additions and 3 deletions

View file

@ -62,8 +62,8 @@
"jsdom": "^24.1.0", "jsdom": "^24.1.0",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"tempy": "^3.1.0", "tempy": "^3.1.0",
"tsimp": "^2.0.11", "tsimp": "2.0.11",
"typescript": "^5.5.3", "typescript": "5.5.3",
"xo": "^0.58.0", "xo": "^0.58.0",
"zen-observable": "^0.10.0" "zen-observable": "^0.10.0"
}, },

View file

@ -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 // 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; return true;
} }