diff --git a/packages/main/src/components/VariantManagement/index.tsx b/packages/main/src/components/VariantManagement/index.tsx index 250b1356b8..8b6ccc7bfb 100644 --- a/packages/main/src/components/VariantManagement/index.tsx +++ b/packages/main/src/components/VariantManagement/index.tsx @@ -317,8 +317,7 @@ const VariantManagement = forwardRef } }, [safeChildrenWithFavorites]); - // todo: this applies if `readOnly` is set to `false` as well since the value is read via data-attribute and is therefore a string not a boolean - const showSaveBtn = dirtyState && !Object.prototype.hasOwnProperty.call(selectedVariant, 'readOnly'); + const showSaveBtn = dirtyState && selectedVariant && !selectedVariant.readOnly; return (