Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktoriiaNakoryk committed Feb 26, 2024
1 parent b062e01 commit 02a34c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/refact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ export function isStatisticDataResponse(
json: unknown,
): json is { data: string } {
if (!json || typeof json !== "object") return false;
return typeof (json as { data?: unknown }).data === "string";
if (!("data" in json)) return false;
return typeof json.data === "string";
}

export async function getStatisticData(
Expand Down

0 comments on commit 02a34c4

Please sign in to comment.