Skip to content

Commit 0eb1c3b

Browse files
authoredJul 19, 2024
fix: relax error checking for AbortError (#222)
1 parent d13ad70 commit 0eb1c3b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
 

‎src/index.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,14 @@ export class UnleashClient extends TinyEmitter {
505505
};
506506
}
507507
} catch (e) {
508-
if (!(e instanceof DOMException && e.name === 'AbortError')) {
508+
if (
509+
!(
510+
typeof e === 'object' &&
511+
e !== null &&
512+
'name' in e &&
513+
e.name === 'AbortError'
514+
)
515+
) {
509516
console.error(
510517
'Unleash: unable to fetch feature toggles',
511518
e

0 commit comments

Comments
 (0)