@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.
Files changed (2) hide show
  1. package/global/read.js +1 -1
  2. 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) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
3
  "license": "UNLICENSED",
4
- "version": "1.2.15",
4
+ "version": "1.2.16",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"