rozod 4.7.1 → 4.7.3

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/lib/cache.js +4 -2
  2. package/package.json +1 -1
package/lib/cache.js CHANGED
@@ -67,8 +67,8 @@ class ChromeStore {
67
67
  return {};
68
68
  return new Promise((resolve) => {
69
69
  // @ts-ignore
70
- chrome.storage.local.get(null, (result) => {
71
- resolve(result.filter((key) => key.startsWith('rozod_cache:')));
70
+ chrome?.storage?.local?.get?.(null, (result) => {
71
+ resolve(result?.filter?.((key) => key.startsWith('rozod_cache:')));
72
72
  });
73
73
  });
74
74
  }
@@ -112,6 +112,8 @@ class Cache {
112
112
  return;
113
113
  this.didCheckExpired = true;
114
114
  const entries = await this.store.all();
115
+ if (!entries)
116
+ return;
115
117
  Object.keys(entries).forEach(async (key) => {
116
118
  const entry = entries[key];
117
119
  if (entry.expiresAt && entry.expiresAt < Date.now()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rozod",
3
- "version": "4.7.1",
3
+ "version": "4.7.3",
4
4
  "description": "A TypeScript wrapper for the Roblox API",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",