Skip to content

Commit

Permalink
fix: relax error checking for AbortError (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Jul 19, 2024
1 parent d13ad70 commit 0eb1c3b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,14 @@ export class UnleashClient extends TinyEmitter {
};
}
} catch (e) {
if (!(e instanceof DOMException && e.name === 'AbortError')) {
if (
!(
typeof e === 'object' &&
e !== null &&
'name' in e &&
e.name === 'AbortError'
)
) {
console.error(
'Unleash: unable to fetch feature toggles',
e
Expand Down

0 comments on commit 0eb1c3b

Please sign in to comment.