File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
packages/micro-journeys/src Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -117,10 +117,27 @@ class BoltInteractivePathways extends withLitHtml() {
117
117
@click =${ ( ) => {
118
118
this . showPathway ( i ) ;
119
119
setTimeout ( ( ) => {
120
- this . renderRoot
121
- . querySelector ( 'bolt-micro-journeys-dropdown' )
122
- . renderRoot . querySelector ( 'button' )
123
- . click ( ) ;
120
+ try {
121
+ let boltMicroJourneyDropdown ;
122
+ let boltMicroJourneyDropdownButton ;
123
+ boltMicroJourneyDropdown = this . renderRoot
124
+ ? this . renderRoot . querySelector (
125
+ 'bolt-micro-journeys-dropdown' ,
126
+ )
127
+ : null ;
128
+ if ( boltMicroJourneyDropdown ) {
129
+ boltMicroJourneyDropdownButton = boltMicroJourneyDropdown . renderRoot
130
+ ? boltMicroJourneyDropdown . renderRoot . querySelector (
131
+ 'button' ,
132
+ )
133
+ : null ;
134
+ }
135
+ if ( boltMicroJourneyDropdownButton ) {
136
+ boltMicroJourneyDropdownButton . click ( ) ;
137
+ }
138
+ } catch {
139
+ console . error ( 'Autoclose of micro-journey dropdown failed' ) ;
140
+ }
124
141
} ) ;
125
142
} }
126
143
style =${ menuItemTextColor }
You can’t perform that action at this time.
0 commit comments