Commit 4e7e828
fix: CreateConnection crash — hasDetailsChanged used before declaration
The useMemo for hasDetailsChanged was declared after the useCallback
(handleCreateOrUpdate) that references it in its dependency array.
JavaScript's temporal dead zone causes a ReferenceError when the
useCallback closure captures the variable before the useMemo
initializes it. Moved the useMemo above the useCallback.
Introduced by PR #57 (connection name/description edit fix).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent f4e9081 commit 4e7e828
File tree
1 file changed
+8
-9
lines changed- frontend/src/base/components/environment
1 file changed
+8
-9
lines changedLines changed: 8 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
| |||
407 | 415 | | |
408 | 416 | | |
409 | 417 | | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | 418 | | |
420 | 419 | | |
421 | 420 | | |
| |||
0 commit comments