Skip to content

Commit

Permalink
perf(scraper): reorder conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
kripod committed Apr 20, 2024
1 parent 39a3c35 commit 87a2a2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/content/quoteRecords/_scraper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ for (const rateRow of rateRows) {
let date: Date | undefined;

for (const [key, value] of Object.entries(rateRow)) {
if (value instanceof Date) {
date = value;
} else if (date != null) {
if (date != null) {
const unit = unitByCurrency.get(key);
if (unit != null) {
const offsetRate = safeParseFloat(value);
Expand All @@ -79,6 +77,8 @@ for (const rateRow of rateRows) {
}
}
}
} else if (value instanceof Date) {
date = value;
}
}
}
Expand Down

0 comments on commit 87a2a2c

Please sign in to comment.