We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea124b4 commit fc63fa9Copy full SHA for fc63fa9
src/actions/delete.ts
@@ -113,8 +113,8 @@ export class DeleteAction {
113
// Run the original precondition code, from the context menu option.
114
// If the item would be hidden or disabled, respect it.
115
const originalPreconditionResult =
116
- this.oldContextMenuItem!.preconditionFn(scope);
117
- if (!ws || originalPreconditionResult != 'enabled') {
+ this.oldContextMenuItem!.preconditionFn?.(scope) ?? 'enabled';
+ if (!ws || originalPreconditionResult !== 'enabled') {
118
return originalPreconditionResult;
119
}
120
0 commit comments