From 3d61106cc161d26716a2c4e65328d23a437b884e Mon Sep 17 00:00:00 2001 From: naman-bruno Date: Mon, 15 Dec 2025 18:20:36 +0530 Subject: [PATCH] fix: rename crash (#6410) --- .../RequestTabs/RequestTab/index.js | 35 +++---------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js b/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js index 0861d873e..18633c2da 100644 --- a/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js +++ b/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js @@ -51,6 +51,10 @@ const RequestTab = ({ tab, collection, tabIndex, collectionRequestTabs, folderUi } }, [item]); + const hasChanges = useMemo(() => hasRequestChanges(item), [item]); + + const isWS = item?.type === 'ws-request'; + useEffect(() => { if (!item || !tabNameRef.current || !setHasOverflow) return; @@ -236,8 +240,6 @@ const RequestTab = ({ tab, collection, tabIndex, collectionRequestTabs, folderUi ); } - const hasChanges = useMemo(() => hasRequestChanges(item), [item]); - if (!item) { return ( { - const checkOverflow = () => { - if (tabNameRef.current && setHasOverflow) { - const hasOverflow = tabNameRef.current.scrollWidth > tabNameRef.current.clientWidth; - if (lastOverflowStateRef.current !== hasOverflow) { - lastOverflowStateRef.current = hasOverflow; - setHasOverflow(hasOverflow); - } - } - }; - - const timeoutId = setTimeout(checkOverflow, 0); - - const resizeObserver = new ResizeObserver(() => { - checkOverflow(); - }); - - if (tabNameRef.current) { - resizeObserver.observe(tabNameRef.current); - } - - return () => { - clearTimeout(timeoutId); - resizeObserver.disconnect(); - }; - }, [item.name, method, setHasOverflow]); - return ( {showConfirmClose && (