@biela.dev/core 1.7.11 → 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 +13 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/lite.cjs +13 -4
- package/dist/lite.cjs.map +1 -1
- package/dist/lite.js +13 -4
- package/dist/lite.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -859,11 +859,20 @@ var CustomSVGStore = class {
|
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
861
|
persist(all) {
|
|
862
|
-
if (!this.storage) return;
|
|
863
862
|
const json = JSON.stringify(all);
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
863
|
+
if (this.storage) {
|
|
864
|
+
try {
|
|
865
|
+
this.storage.setItem(SVG_OVERRIDES_KEY, json);
|
|
866
|
+
} catch {
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
if (typeof fetch !== "undefined") {
|
|
870
|
+
fetch("/api/storage/svg-overrides", {
|
|
871
|
+
method: "PUT",
|
|
872
|
+
headers: { "Content-Type": "application/json" },
|
|
873
|
+
body: json
|
|
874
|
+
}).catch(() => {
|
|
875
|
+
});
|
|
867
876
|
}
|
|
868
877
|
}
|
|
869
878
|
};
|