Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: Fix transition (#3676)

Ivan Starkov6ebcd5cefd16
diff --git a/apps/builder/app/builder/features/style-panel/style-layer-utils.ts b/apps/builder/app/builder/features/style-panel/style-layer-utils.ts
index 459eaeb54f..506484bc3d 100644
--- a/apps/builder/app/builder/features/style-panel/style-layer-utils.ts
+++ b/apps/builder/app/builder/features/style-panel/style-layer-utils.ts
@@ -199,9 +199,11 @@ export const getHumanizedTextFromLayer = (
case "transitionProperty":
if (layer.type === "tuple") {
const properties = [...layer.value];
- const transitionProperty = properties.find(
+
+ let transitionProperty = properties.find(
(item): item is KeywordValue =>
- item.type === "keyword" && isAnimatableProperty(item.value) === true
+ (item.type === "unparsed" || item.type === "keyword") &&
+ isAnimatableProperty(item.value) === true
);
const transitionTimingFunction = properties.find(
@@ -211,7 +213,10 @@ export const getHumanizedTextFromLayer = (
);
if (transitionProperty === undefined) {
- throw `Transition property is missing from the layer ${JSON.stringify(layer)}`;
+ transitionProperty = {
+ type: "keyword",
+ value: "unknown",
+ };
}
properties.splice(properties.indexOf(transitionProperty), 1);