@8ms/helpers 1.2.15 → 1.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/global/read.js +1 -1
- package/package.json +1 -1
package/global/read.js
CHANGED
|
@@ -18,7 +18,7 @@ const read = async ({ key }) => {
|
|
|
18
18
|
// Exists (0 is determined as forever)
|
|
19
19
|
else if (0 != global['ems_cache'][key].expires) {
|
|
20
20
|
// https://ui.dev/get-current-timestamp-javascript
|
|
21
|
-
const expiresAt = Math.floor(global['ems_cache'][key].insertedAt / 1000) + global[key].expires;
|
|
21
|
+
const expiresAt = Math.floor(global['ems_cache'][key].insertedAt / 1000) + global['ems_cache'][key].expires;
|
|
22
22
|
const now = Math.floor(Date.now() / 1000);
|
|
23
23
|
// If we are now beyond the expiry date, update the data
|
|
24
24
|
if (now > expiresAt) {
|