mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-27 12:56:39 +01:00
placing the check directly in the return statement
This commit is contained in:
@@ -443,7 +443,7 @@ class CodeActionAdapter {
|
||||
this._logService.warn(`${this._extension.identifier.value} - Code actions of kind '${codeActionContext.only.value} 'requested but returned code action is of kind '${candidate.kind.value}'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.`);
|
||||
}
|
||||
}
|
||||
const isCopilot = 'isCopilot' in candidate && typeof candidate.isCopilot === 'boolean' ? candidate.isCopilot : false;
|
||||
|
||||
// new school: convert code action
|
||||
actions.push({
|
||||
cacheId: [cacheId, i],
|
||||
@@ -454,7 +454,7 @@ class CodeActionAdapter {
|
||||
kind: candidate.kind && candidate.kind.value,
|
||||
isPreferred: candidate.isPreferred,
|
||||
disabled: candidate.disabled?.reason,
|
||||
isCopilot
|
||||
isCopilot: 'isCopilot' in candidate && typeof candidate.isCopilot === 'boolean' ? candidate.isCopilot : false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user