Fixed the return type of isCurseForgeError

Previously, it would return `undefined` instead of `false` when `error` was undefined.
This commit is contained in:
Kir_Antipov 2024-01-03 18:19:54 +00:00
parent f9620d09b5
commit 4ea0380bed

View file

@ -23,7 +23,7 @@ export interface CurseForgeError {
export function isCurseForgeError(error: unknown): error is CurseForgeError {
const e = error as CurseForgeError;
return (
e &&
!!e &&
typeof e.errorCode === "number" &&
typeof e.errorMessage === "string"
);