From 2b942faec1dfd1946e89ff56726876a955121ef8 Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Mon, 31 Oct 2022 18:04:24 +0100 Subject: [PATCH 1/2] Fix: #3534 --- components/lib/splitter/Splitter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/splitter/Splitter.js b/components/lib/splitter/Splitter.js index 83ef09818b..194c6fbe5d 100644 --- a/components/lib/splitter/Splitter.js +++ b/components/lib/splitter/Splitter.js @@ -23,7 +23,7 @@ export const Splitter = React.memo( const isStateful = props.stateKey != null; const childrenLength = props.children && props.children.length; - const panelSize = (sizes, index) => (index in sizes ? sizes[index] : (props.children[index].props.size || 100) / childrenLength); + const panelSize = (sizes, index) => (index in sizes ? sizes[index] : (props.children[index].props.size || 100 / childrenLength)); const [bindDocumentMouseMoveListener, unbindDocumentMouseMoveListener] = useEventListener({ type: 'mousemove', listener: (event) => onResize(event) }); const [bindDocumentMouseUpListener, unbindDocumentMouseUpListener] = useEventListener({ From d41cd42d4a267e2450a1451fc759e8fc6b2dac0d Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Mon, 31 Oct 2022 19:17:08 +0200 Subject: [PATCH 2/2] lint --- components/lib/splitter/Splitter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/splitter/Splitter.js b/components/lib/splitter/Splitter.js index 194c6fbe5d..b1827d7d58 100644 --- a/components/lib/splitter/Splitter.js +++ b/components/lib/splitter/Splitter.js @@ -23,7 +23,7 @@ export const Splitter = React.memo( const isStateful = props.stateKey != null; const childrenLength = props.children && props.children.length; - const panelSize = (sizes, index) => (index in sizes ? sizes[index] : (props.children[index].props.size || 100 / childrenLength)); + const panelSize = (sizes, index) => (index in sizes ? sizes[index] : props.children[index].props.size || 100 / childrenLength); const [bindDocumentMouseMoveListener, unbindDocumentMouseMoveListener] = useEventListener({ type: 'mousemove', listener: (event) => onResize(event) }); const [bindDocumentMouseUpListener, unbindDocumentMouseUpListener] = useEventListener({