@@ -121,7 +121,7 @@ export const MenuBar: React.FC<MenuBarProps> = function ({ displayInferErrors })
121
121
dispatch ( toggleComplete ( declaration . id ) ) ;
122
122
} ;
123
123
const goToPreviousMatch = ( ) => {
124
- if ( ! declaration || currentUserAction !== NoUserAction ) {
124
+ if ( ! declaration || currentUserAction . type !== NoUserAction . type ) {
125
125
return ;
126
126
}
127
127
@@ -152,7 +152,7 @@ export const MenuBar: React.FC<MenuBarProps> = function ({ displayInferErrors })
152
152
}
153
153
} ;
154
154
const goToNextMatch = ( ) => {
155
- if ( ! declaration || currentUserAction !== NoUserAction ) {
155
+ if ( ! declaration || currentUserAction . type !== NoUserAction . type ) {
156
156
return ;
157
157
}
158
158
@@ -183,7 +183,7 @@ export const MenuBar: React.FC<MenuBarProps> = function ({ displayInferErrors })
183
183
}
184
184
} ;
185
185
const goToParent = ( ) => {
186
- if ( ! declaration || currentUserAction !== NoUserAction ) {
186
+ if ( ! declaration || currentUserAction . type !== NoUserAction . type ) {
187
187
return ;
188
188
}
189
189
@@ -193,22 +193,22 @@ export const MenuBar: React.FC<MenuBarProps> = function ({ displayInferErrors })
193
193
}
194
194
} ;
195
195
const expandAll = ( ) => {
196
- if ( currentUserAction === NoUserAction ) {
196
+ if ( currentUserAction . type === NoUserAction . type ) {
197
197
dispatch ( setAllExpandedInTreeView ( getDescendantsOrSelf ( pythonPackage ) ) ) ;
198
198
}
199
199
} ;
200
200
const collapseAll = ( ) => {
201
- if ( currentUserAction === NoUserAction ) {
201
+ if ( currentUserAction . type === NoUserAction . type ) {
202
202
dispatch ( setAllCollapsedInTreeView ( getDescendantsOrSelf ( pythonPackage ) ) ) ;
203
203
}
204
204
} ;
205
205
const expandSelected = ( ) => {
206
- if ( declaration && currentUserAction === NoUserAction ) {
206
+ if ( declaration && currentUserAction . type === NoUserAction . type ) {
207
207
dispatch ( setAllExpandedInTreeView ( getDescendantsOrSelf ( declaration ) ) ) ;
208
208
}
209
209
} ;
210
210
const collapseSelected = ( ) => {
211
- if ( declaration && currentUserAction === NoUserAction ) {
211
+ if ( declaration && currentUserAction . type === NoUserAction . type ) {
212
212
dispatch ( setAllCollapsedInTreeView ( getDescendantsOrSelf ( declaration ) ) ) ;
213
213
}
214
214
} ;
@@ -345,7 +345,7 @@ export const MenuBar: React.FC<MenuBarProps> = function ({ displayInferErrors })
345
345
< MenuButton
346
346
as = { Button }
347
347
rightIcon = { < Icon as = { FaChevronDown } /> }
348
- disabled = { currentUserAction !== NoUserAction }
348
+ disabled = { currentUserAction . type !== NoUserAction . type }
349
349
>
350
350
Navigate
351
351
</ MenuButton >
0 commit comments