Skip to content

Commit f34fd60

Browse files
committed
use new 'camelizeResponse' implementation
1 parent 8392cfd commit f34fd60

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/response/models/insights.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ export default class Insights extends Score {
5858
response: webRecords.InsightsResponse,
5959
prop: keyof webRecords.InsightsResponse
6060
): T | undefined {
61-
return response[prop]
62-
? (camelizeResponse(response[prop]) as unknown as T)
63-
: undefined;
61+
return response[prop] ? (camelizeResponse(response[prop]) as T) : undefined;
6462
}
6563

6664
private getIpAddress(

src/response/models/score.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default class Score {
5151
this.queriesRemaining = response.queries_remaining;
5252
this.riskScore = response.risk_score;
5353
this.warnings = response.warnings
54-
? (camelizeResponse(response.warnings) as unknown as records.Warning[])
54+
? (camelizeResponse(response.warnings) as records.Warning[])
5555
: undefined;
5656
}
5757
}

0 commit comments

Comments
 (0)