Skip to content

Commit fc63fa9

Browse files
committed
fix: Fix some minor typing issues.
1 parent ea124b4 commit fc63fa9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/actions/delete.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ export class DeleteAction {
113113
// Run the original precondition code, from the context menu option.
114114
// If the item would be hidden or disabled, respect it.
115115
const originalPreconditionResult =
116-
this.oldContextMenuItem!.preconditionFn(scope);
117-
if (!ws || originalPreconditionResult != 'enabled') {
116+
this.oldContextMenuItem!.preconditionFn?.(scope) ?? 'enabled';
117+
if (!ws || originalPreconditionResult !== 'enabled') {
118118
return originalPreconditionResult;
119119
}
120120

0 commit comments

Comments
 (0)