Skip to content

Commit a878d16

Browse files
refactor(ObjectPage): remove unless conditional (#8551)
To fix this, remove the redundant `headerArea &&` in the `headerContentVisible` prop passed to `ObjectPageAnchorBar`, since the entire block is already guarded by `headerArea && titleArea`. Best single fix (no functionality change): - In `packages/main/src/components/ObjectPage/index.tsx`, inside the `ObjectPageAnchorBar` JSX props (around line 772), change: - `headerContentVisible={headerArea && headerCollapsed !== true}` - to - `headerContentVisible={headerCollapsed !== true}` No new imports, methods, or dependencies are needed. _Suggested fixes powered by Copilot Autofix. Review carefully before merging._ Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 0d48b51 commit a878d16

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/main/src/components/ObjectPage

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
769769
}}
770770
>
771771
<ObjectPageAnchorBar
772-
headerContentVisible={headerArea && headerCollapsed !== true}
772+
headerContentVisible={headerCollapsed !== true}
773773
hidePinButton={!!hidePinButton}
774774
headerPinned={headerPinned}
775775
accessibilityAttributes={accessibilityAttributes?.objectPageAnchorBar}

0 commit comments

Comments
 (0)