| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 14a160a commit a27534e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -264,7 +264,7 @@ const signal = ac.signal; | |||
| 264 | 264 | setImmediatePromise('foobar', { signal }) | |
| 265 | 265 | .then(console.log) | |
| 266 | 266 | .catch((err) => { | |
| 267 | - if (err.message === 'AbortError') | ||
| 267 | + if (err.name === 'AbortError') | ||
| 268 | 268 | console.log('The immediate was aborted'); | |
| 269 | 269 | }); | |
| 270 | 270 | ||
@@ -283,7 +283,7 @@ const signal = ac.signal; | |||
| 283 | 283 | setTimeoutPromise(1000, 'foobar', { signal }) | |
| 284 | 284 | .then(console.log) | |
| 285 | 285 | .catch((err) => { | |
| 286 | - if (err.message === 'AbortError') | ||
| 286 | + if (err.name === 'AbortError') | ||
| 287 | 287 | console.log('The timeout was aborted'); | |
| 288 | 288 | }); | |
| 289 | 289 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments