Commit 7193449
committed
Prevent crash when
Replace `useLayoutContext()` with `useMaybeLayoutContext()` in
`useSettingsToggle` to handle cases where `LayoutContext` is not
provided, preventing crashes when settings control is enabled in
`ControlBar` component.
Signed-off-by: Sora Morimoto <sora@morimoto.io>settings control is enabled in ControlBar
1 parent 0c0ea75 commit 7193449
File tree
2 files changed
+12
-2
lines changed- .changeset
- packages/react/src/hooks
2 files changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
0 commit comments