fix: correct formatCentsToCurrency usage in kijiji scraper
This commit is contained in:
@@ -494,7 +494,7 @@ function _parseListing(
|
|||||||
|
|
||||||
const cents = price?.amount != null ? Number(price.amount) : undefined;
|
const cents = price?.amount != null ? Number(price.amount) : undefined;
|
||||||
const amountFormatted =
|
const amountFormatted =
|
||||||
cents != null ? formatCentsToCurrency(cents / 100, "en-CA") : undefined;
|
cents != null ? formatCentsToCurrency(cents, "en-CA") : undefined;
|
||||||
|
|
||||||
const numberOfViews =
|
const numberOfViews =
|
||||||
metrics?.views != null ? Number(metrics.views) : undefined;
|
metrics?.views != null ? Number(metrics.views) : undefined;
|
||||||
@@ -573,7 +573,7 @@ export async function parseDetailedListing(
|
|||||||
|
|
||||||
const cents = price?.amount != null ? Number(price.amount) : undefined;
|
const cents = price?.amount != null ? Number(price.amount) : undefined;
|
||||||
const amountFormatted =
|
const amountFormatted =
|
||||||
cents != null ? formatCentsToCurrency(cents / 100, "en-CA") : undefined;
|
cents != null ? formatCentsToCurrency(cents, "en-CA") : undefined;
|
||||||
|
|
||||||
const numberOfViews =
|
const numberOfViews =
|
||||||
metrics?.views != null ? Number(metrics.views) : undefined;
|
metrics?.views != null ? Number(metrics.views) : undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user