Skip to content

Commit

Permalink
fix: catch error unknown type
Browse files Browse the repository at this point in the history
  • Loading branch information
iamogbz committed Aug 30, 2021
1 parent 916128e commit 641784d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function spyOnProp<T>(
return jestInstance.spyOnProp(object, propName);
} catch (e) {
// eslint-disable-next-line no-console
console.warn(e.message);
console.warn((e as Error).message);
return object[propName];
}
}
Expand Down

0 comments on commit 641784d

Please sign in to comment.