@esportsplus/web-storage 0.0.6 → 0.0.7

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.
@@ -42,6 +42,9 @@ const has = async (key) => {
42
42
  let k = key.split('.'), f = k.shift() || '', value = await localforage.getItem(f);
43
43
  if (value !== null) {
44
44
  set(f, value);
45
+ if (Array.isArray(value) && k.length == 0) {
46
+ return true;
47
+ }
45
48
  if (typeof value === 'object' && !Array.isArray(value) && value !== null) {
46
49
  return dot.has(value, k.join('.'));
47
50
  }
package/package.json CHANGED
@@ -26,5 +26,5 @@
26
26
  "prepublishOnly": "npm run build"
27
27
  },
28
28
  "types": "./build/index.d.ts",
29
- "version": "0.0.6"
29
+ "version": "0.0.7"
30
30
  }
@@ -66,6 +66,10 @@ const has = async (key: string): Promise<boolean> => {
66
66
  if (value !== null) {
67
67
  set(f, value);
68
68
 
69
+ if (Array.isArray(value) && k.length == 0) {
70
+ return true;
71
+ }
72
+
69
73
  if (typeof value === 'object' && !Array.isArray(value) && value !== null) {
70
74
  return dot.has(value, k.join('.'));
71
75
  }