Skip to content

Commit

Permalink
refactor(scraper): reorder checks
Browse files Browse the repository at this point in the history
  • Loading branch information
kripod committed Apr 20, 2024
1 parent dcfed17 commit 9e5cb09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/content/quoteRecords/_scraper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ for (const rateRow of rateRows) {

for (const [key, value] of Object.entries(rateRow)) {
if (date != null) {
const unit = unitByCurrency.get(key);
if (unit != null) {
const offsetRate = safeParseFloat(value);
if (offsetRate != null) {
const offsetRate = safeParseFloat(value);
if (offsetRate != null) {
const unit = unitByCurrency.get(key);
if (unit != null) {
const rate = roundTo(
offsetRate / unit,
DEFAULT_FRACTION_DIGITS + Math.ceil(Math.log10(unit)),
Expand Down

0 comments on commit 9e5cb09

Please sign in to comment.