mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 09:38:38 +01:00
fix invalid command converter behaviour
This commit is contained in:
@@ -276,7 +276,7 @@ export class CommandsConverter {
|
||||
toInternal(command: vscode.Command | undefined, disposables: DisposableStore): ICommandDto | undefined;
|
||||
toInternal(command: vscode.Command | undefined, disposables: DisposableStore): ICommandDto | undefined {
|
||||
|
||||
if (!command || !command.command) {
|
||||
if (!command) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -287,6 +287,11 @@ export class CommandsConverter {
|
||||
tooltip: command.tooltip
|
||||
};
|
||||
|
||||
if (!command.command) {
|
||||
// falsy command id -> return converted command but don't attempt any
|
||||
// argument or API-command dance since this command won't run anyways
|
||||
return result;
|
||||
}
|
||||
|
||||
const apiCommand = this._lookupApiCommand(command.command);
|
||||
if (apiCommand) {
|
||||
|
||||
Reference in New Issue
Block a user