Skip to content

Commit ce12f05

Browse files
committed
fix(NcAppSidebar): check handling of conditionally rendered elements
Signed-off-by: Maksim Sukharev <[email protected]>
1 parent f086d2e commit ce12f05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/NcAppSidebar/NcAppSidebar.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ export default {
10211021
document.querySelector('#header'),
10221022
], {
10231023
allowOutsideClick: true,
1024-
fallbackFocus: this.$refs.closeButton.$el,
1024+
fallbackFocus: this.$refs.closeButton?.$el ?? this.$refs.sidebar,
10251025
trapStack: getTrapStack(),
10261026
escapeDeactivates: false,
10271027
})
@@ -1166,7 +1166,7 @@ export default {
11661166
* @public
11671167
*/
11681168
focus() {
1169-
this.$refs.header.focus()
1169+
this.$refs.header?.focus()
11701170
},
11711171

11721172
/**

0 commit comments

Comments
 (0)