Skip to content

Commit 6263f5c

Browse files
committed
fix(VariantManagement): drop hasOwnProperty from selectedVariant.readOnly check
Fixes #6617
1 parent d390fc2 commit 6263f5c

File tree

1 file changed

+1
-3
lines changed
  • packages/main/src/components/VariantManagement

1 file changed

+1
-3
lines changed

packages/main/src/components/VariantManagement/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,7 @@ const VariantManagement = forwardRef<HTMLDivElement, VariantManagementPropTypes>
317317
}
318318
}, [safeChildrenWithFavorites]);
319319

320-
// 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
321-
const showSaveBtn =
322-
dirtyState && selectedVariant && !Object.prototype.hasOwnProperty.call(selectedVariant, 'readOnly');
320+
const showSaveBtn = dirtyState && selectedVariant && !selectedVariant.readOnly;
323321

324322
return (
325323
<div className={variantManagementClasses} style={style} {...rest} ref={ref}>

0 commit comments

Comments
 (0)