storyblok 4.19.0 → 4.19.1
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 +3 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -5751,10 +5751,8 @@ const getPropertyTypeAnnotation = (property, prefix, suffix) => {
|
|
|
5751
5751
|
return { type: property.type };
|
|
5752
5752
|
}
|
|
5753
5753
|
let type = "unknown";
|
|
5754
|
-
const
|
|
5755
|
-
|
|
5756
|
-
options.unshift("");
|
|
5757
|
-
}
|
|
5754
|
+
const optionValues = property.options && property.options.length > 0 ? property.options.map((item) => item.value).filter((value) => value !== "") : [];
|
|
5755
|
+
const options = optionValues.length > 0 && !property.required ? ["", ...optionValues] : optionValues;
|
|
5758
5756
|
if (property.source === "internal_stories") {
|
|
5759
5757
|
if (property.filter_content_type) {
|
|
5760
5758
|
return {
|
|
@@ -7725,7 +7723,7 @@ const extractAssetSizeFromFilename = (filename) => {
|
|
|
7725
7723
|
}
|
|
7726
7724
|
try {
|
|
7727
7725
|
const segments = new URL(filename).pathname.split("/");
|
|
7728
|
-
return segments.find((segment) => /^\d+x\d
|
|
7726
|
+
return segments.find((segment) => /^\d+x\d+$/i.test(segment));
|
|
7729
7727
|
} catch {
|
|
7730
7728
|
return void 0;
|
|
7731
7729
|
}
|