Skip to content

Commit e29e2b9

Browse files
author
Theodore Li
committed
Fix syntax
1 parent 6f35179 commit e29e2b9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

apps/sim/tools/firecrawl/scrape.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@ export const scrapeTool: ToolConfig<ScrapeParams, ScrapeResponse> = {
3939
type: 'custom',
4040
getCost: (_params, output) => {
4141
const creditsUsed = (output.metadata as { creditsUsed?: number })?.creditsUsed
42-
if (creditsUsedString == null) {
42+
if (creditsUsed == null) {
4343
throw new Error('Firecrawl response missing creditsUsed field')
4444
}
4545

46-
const creditsUsed = Number(creditsUsedString)
4746
if (Number.isNaN(creditsUsed)) {
4847
throw new Error('Firecrawl response returned a non-numeric creditsUsed field')
4948
}

0 commit comments

Comments
 (0)