@biela.dev/core 1.7.10 → 1.7.12

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.cjs CHANGED
@@ -861,11 +861,20 @@ var CustomSVGStore = class {
861
861
  }
862
862
  }
863
863
  persist(all) {
864
- if (!this.storage) return;
865
864
  const json = JSON.stringify(all);
866
- try {
867
- this.storage.setItem(SVG_OVERRIDES_KEY, json);
868
- } catch {
865
+ if (this.storage) {
866
+ try {
867
+ this.storage.setItem(SVG_OVERRIDES_KEY, json);
868
+ } catch {
869
+ }
870
+ }
871
+ if (typeof fetch !== "undefined") {
872
+ fetch("/api/storage/svg-overrides", {
873
+ method: "PUT",
874
+ headers: { "Content-Type": "application/json" },
875
+ body: json
876
+ }).catch(() => {
877
+ });
869
878
  }
870
879
  }
871
880
  };