mirror of
https://github.com/Kong/insomnia.git
synced 2026-11-05 04:23:55 -05:00
fix: update condition in useEffect to properly handle modal open state
This commit is contained in:
1 file changed
+1
-1
@@ -40,7 +40,7 @@ export const ProjectModal = ({
|
||||
}, [isOpen]);
|
||||
|
||||
useEffect(() => {
|
||||
if (activeNavigation && activeNavigation.state !== 'idle' && activeNavigation.location && isOpen) {
|
||||
if (isOpen && location.pathname !== openedAtPathRef.current) {
|
||||
onOpenChange(false);
|
||||
}
|
||||
}, [location, isOpen, onOpenChange]);
|
||||
|
||||
Reference in new issue
Block a user