Skip to content

Commit 00026dc

Browse files
prefer curly braces
Co-Authored-By: Michaël De Boey <info@michaeldeboey.be>
1 parent fcaf16b commit 00026dc

File tree

1 file changed

+3
-1
lines changed
  • packages/components/src/components/Dialog

1 file changed

+3
-1
lines changed

packages/components/src/components/Dialog/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ const Content = ({ style = {}, children, ...props }) => {
159159
};
160160

161161
const centered = (triggerRect, dialogRect) => {
162-
if (!dialogRect || !triggerRect) return { left: 0, top: 0 };
162+
if (!dialogRect || !triggerRect) {
163+
return { left: 0, top: 0 };
164+
}
163165

164166
const triggerCenter = triggerRect.left + triggerRect.width / 2;
165167
const left = triggerCenter - dialogRect.width / 2;

0 commit comments

Comments
 (0)