Skip to content

Commit 9c588ff

Browse files
committed
address compilation error
1 parent 8587c5c commit 9c588ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Extension/src/LanguageServer/Providers/codeActionProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export class CodeActionProvider implements vscode.CodeActionProvider {
144144
if (codeActionCodeInfo !== undefined) {
145145
if (codeActionCodeInfo.fixAllTypeCodeAction !== undefined &&
146146
(codeActionCodeInfo.uriToInfo.size > 1 ||
147-
codeActionCodeInfo.uriToInfo.values().next().value.numValidWorkspaceEdits > 1)) {
147+
(codeActionCodeInfo.uriToInfo.values().next().value?.numValidWorkspaceEdits ?? 0) > 1)) {
148148
// Only show the "fix all type" if there is more than one fix for the type.
149149
fixCodeActions.push(codeActionCodeInfo.fixAllTypeCodeAction);
150150
}
@@ -161,7 +161,7 @@ export class CodeActionProvider implements vscode.CodeActionProvider {
161161
if (codeActionCodeInfo.removeAllTypeCodeAction !== undefined &&
162162
codeActionCodeInfo.uriToInfo.size > 0 &&
163163
(codeActionCodeInfo.uriToInfo.size > 1 ||
164-
codeActionCodeInfo.uriToInfo.values().next().value.identifiers.length > 1)) {
164+
(codeActionCodeInfo.uriToInfo.values().next().value?.identifiers?.length ?? 0) > 1)) {
165165
// Only show the "clear all type" if there is more than one fix for the type.
166166
removeAllTypeAvailable = true;
167167
}

0 commit comments

Comments
 (0)