We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c9bb68 commit 258573aCopy full SHA for 258573a
1 file changed
components/drawer/DrawerPanel.tsx
@@ -117,15 +117,11 @@ const DrawerPanel: React.FC<DrawerPanelProps> = (props) => {
117
});
118
119
const closablePlacement = React.useMemo<'start' | 'end' | undefined>(() => {
120
- const mergedClosableVal = closable ?? contextClosable;
121
- if (mergedClosableVal === false) {
+ const merged = closable ?? contextClosable;
+ if (merged === false) {
122
return undefined;
123
}
124
- if (
125
- typeof mergedClosableVal === 'object' &&
126
- mergedClosableVal &&
127
- mergedClosableVal.placement === 'end'
128
- ) {
+ if (typeof merged === 'object' && merged?.placement === 'end') {
129
return 'end';
130
131
return 'start';
0 commit comments