File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
app/components/primer/alpha Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @primer/view-components " : patch
3
+ ---
4
+
5
+ Fix potential out-of-bounds error in ActionBar
Original file line number Diff line number Diff line change @@ -145,13 +145,15 @@ class ActionBarElement extends HTMLElement {
145
145
}
146
146
147
147
#showItem( index : number ) {
148
+ if ( ! this . items [ index ] ) return
148
149
this . items [ index ] . style . setProperty ( 'visibility' , 'visible' )
149
- this . #menuItems[ index ] ! . hidden = true
150
+ this . #menuItems[ index ] . hidden = true
150
151
}
151
152
152
153
#hideItem( index : number ) {
154
+ if ( ! this . items [ index ] ) return
153
155
this . items [ index ] . style . setProperty ( 'visibility' , 'hidden' )
154
- this . #menuItems[ index ] ! . hidden = false
156
+ this . #menuItems[ index ] . hidden = false
155
157
}
156
158
157
159
get #menuItems( ) : NodeListOf < HTMLElement > {
You can’t perform that action at this time.
0 commit comments