mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
fix(overflow-menu): add guard to prevent focus on falsy ref #714
Fixes #714
This commit is contained in:
parent
9763bf5cab
commit
776639495f
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@
|
||||||
add({ id, text, primaryFocus });
|
add({ id, text, primaryFocus });
|
||||||
|
|
||||||
afterUpdate(() => {
|
afterUpdate(() => {
|
||||||
if (primaryFocus) {
|
if (ref && primaryFocus) {
|
||||||
ref.focus();
|
ref.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue