Commit 38b21ab
authored
fix(site): gracefully handle reselection of the same preset (coder#17014)
This PR closes coder#16953.
Reselecting a preset that was already the selected preset returned an
undefined option to the onSelect function. We then tried to read an
attribute of this undefined value. With this fix, we handle the
undefined option correctly.1 parent b39477c commit 38b21ab
File tree
2 files changed
+25
-4
lines changed- site/src/pages/CreateWorkspacePage
2 files changed
+25
-4
lines changedLines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
162 | 181 | | |
163 | 182 | | |
164 | 183 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 289 | + | |
| 290 | + | |
293 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
294 | 296 | | |
295 | 297 | | |
296 | 298 | | |
| |||
0 commit comments