@ztimson/utils 0.26.6 → 0.26.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.
package/dist/index.mjs CHANGED
@@ -479,7 +479,9 @@ class Cache {
479
479
  if (((_a = persists.storage) == null ? void 0 : _a.database) != void 0) {
480
480
  persists.storage.createTable({ name: persists.key, key: this.key }).then((table) => {
481
481
  if (key) {
482
- table.set(this.get(key), key);
482
+ const value = this.get(key);
483
+ if (value != null) table.set(value, key);
484
+ else table.delete(key);
483
485
  } else {
484
486
  table.clear();
485
487
  this.all().forEach((row) => table.add(row));