@@ -55,19 +55,19 @@ const ConnectionLine = defineComponent({
5555 const handleType = connectionStartHandle . value . type
5656
5757 const fromHandleBounds = fromNode . value . handleBounds
58- let handleBounds = fromHandleBounds ?. [ handleType ] || [ ]
58+ let handleBounds = fromHandleBounds ?. [ handleType ] ?? [ ]
5959
6060 if ( connectionMode . value === ConnectionMode . Loose ) {
61- const oppositeBounds = fromHandleBounds ?. [ handleType === 'source' ? 'target' : 'source' ] || [ ]
62- handleBounds = [ ...handleBounds , ...oppositeBounds ] || oppositeBounds
61+ const oppositeBounds = fromHandleBounds ?. [ handleType === 'source' ? 'target' : 'source' ] ?? [ ]
62+ handleBounds = [ ...handleBounds , ...oppositeBounds ]
6363 }
6464
6565 if ( ! handleBounds ) {
6666 return null
6767 }
6868
6969 const fromHandle = ( startHandleId ? handleBounds . find ( ( d ) => d . id === startHandleId ) : handleBounds [ 0 ] ) ?? null
70- const fromPosition = fromHandle ?. position || Position . Top
70+ const fromPosition = fromHandle ?. position ?? Position . Top
7171 const { x : fromX , y : fromY } = getHandlePosition ( fromNode . value , fromHandle , fromPosition )
7272
7373 let toHandle : HandleElement | null = null
@@ -81,7 +81,7 @@ const ConnectionLine = defineComponent({
8181 } else {
8282 // if connection mode is loose, look for the handle in both source and target bounds
8383 toHandle =
84- [ ...( toNode . value . handleBounds . source || [ ] ) , ...( toNode . value . handleBounds . target || [ ] ) ] ?. find (
84+ [ ...( toNode . value . handleBounds . source ?? [ ] ) , ...( toNode . value . handleBounds . target ?? [ ] ) ] ?. find (
8585 ( d ) => d . id === connectionEndHandle . value ?. id ,
8686 ) || null
8787 }
0 commit comments