Commit 71c2bcf
fix: remove provider from useEffect dependencies to prevent re-renders
The provider state was being updated inside the effect while also being
included in the dependency array, which could cause unnecessary re-renders
or potential infinite loops. Fixed by using a local newProvider variable
to calculate the correct selected model before updating state.1 parent 70c7695 commit 71c2bcf
File tree
1 file changed
+4
-4
lines changed- webview-ui/src/components/settings
1 file changed
+4
-4
lines changedLines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
65 | 66 | | |
66 | | - | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
0 commit comments