Skip to content

Commit

Permalink
v3.8.2: fix rate is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Sep 10, 2024
1 parent fef271f commit e333604
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ class Currency {
let currency = new Currency({ amount, code, timeZone });
const cacheKey = Currency.getCacheKey(currency.code);
let cachedValue = Currency.getCachedValue(cacheKey);
let rate;
if(cachedValue) {
rate = cachedValue;
} else {
Expand Down
1 change: 1 addition & 0 deletions dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@
let currency = new Currency({ amount, code, timeZone });
const cacheKey = Currency.getCacheKey(currency.code);
let cachedValue = Currency.getCachedValue(cacheKey);
let rate;
if(cachedValue) {
rate = cachedValue;
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/local-currency",
"moduleName": "LocalCurrency",
"version": "3.8.1",
"version": "3.8.2",
"description": "JavaScript library that detects user's local currency and provides functionalities to convert between multiple currencies.",
"main": "dist/umd/index.js",
"module": "dist/esm/index.js",
Expand Down
1 change: 1 addition & 0 deletions src/Currency.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Currency {
let currency = new Currency({ amount, code, timeZone })
const cacheKey = Currency.getCacheKey(currency.code)
let cachedValue = Currency.getCachedValue(cacheKey)
let rate
if(cachedValue) {
rate = cachedValue
} else {
Expand Down

0 comments on commit e333604

Please sign in to comment.