@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.
@@ -8039,13 +8039,19 @@ var HeaderStoreLS = class extends HeaderStore {
8039
8039
  }
8040
8040
  // eslint-disable-next-line @typescript-eslint/require-await
8041
8041
  async load(branch = "main") {
8042
- const bytes = localStorage.getItem(this.headerKey(branch));
8043
- return bytes ? this.parseHeader(bytes.toString()) : null;
8042
+ try {
8043
+ const bytes = localStorage.getItem(this.headerKey(branch));
8044
+ return bytes ? this.parseHeader(bytes.toString()) : null;
8045
+ } catch (e) {
8046
+ }
8044
8047
  }
8045
8048
  // eslint-disable-next-line @typescript-eslint/require-await
8046
8049
  async save(carCid, branch = "main") {
8047
- const headerKey = this.headerKey(branch);
8048
- return localStorage.setItem(headerKey, this.makeHeader(carCid));
8050
+ try {
8051
+ const headerKey = this.headerKey(branch);
8052
+ return localStorage.setItem(headerKey, this.makeHeader(carCid));
8053
+ } catch (e) {
8054
+ }
8049
8055
  }
8050
8056
  };
8051
8057