Skip to content

Commit

Permalink
Fix typos in assertError example (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Dec 11, 2023
1 parent 44f5739 commit 0d323b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/assert-error.ts
Expand Up @@ -14,13 +14,13 @@ import {assertError} from 'ts-extras';
try {
fetchUnicorns();
} catch (error: unknown) {
assertError(error)
assertError(error);
// `error` is now of type `Error`
if (error.message === 'Failed to fetch') {
retry();
returnl
return;
}
throw error;
Expand Down

0 comments on commit 0d323b4

Please sign in to comment.