@fireproof/core 0.10.3-dev → 0.10.4-dev

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.
@@ -8030,13 +8030,19 @@ var HeaderStoreLS = class extends HeaderStore {
8030
8030
  }
8031
8031
  // eslint-disable-next-line @typescript-eslint/require-await
8032
8032
  async load(branch = "main") {
8033
- const bytes = localStorage.getItem(this.headerKey(branch));
8034
- return bytes ? this.parseHeader(bytes.toString()) : null;
8033
+ try {
8034
+ const bytes = localStorage.getItem(this.headerKey(branch));
8035
+ return bytes ? this.parseHeader(bytes.toString()) : null;
8036
+ } catch (e) {
8037
+ }
8035
8038
  }
8036
8039
  // eslint-disable-next-line @typescript-eslint/require-await
8037
8040
  async save(carCid, branch = "main") {
8038
- const headerKey = this.headerKey(branch);
8039
- return localStorage.setItem(headerKey, this.makeHeader(carCid));
8041
+ try {
8042
+ const headerKey = this.headerKey(branch);
8043
+ return localStorage.setItem(headerKey, this.makeHeader(carCid));
8044
+ } catch (e) {
8045
+ }
8040
8046
  }
8041
8047
  };
8042
8048