mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
correct localise call, fallback to err if no err.message is available, protected message service against invalid items, fixes #5891
This commit is contained in:
@@ -28,9 +28,11 @@ export class ExtHostMessageService {
|
||||
let command = commands[handle];
|
||||
if (typeof command === 'string') {
|
||||
items.push({ title: command, handle, isCloseAffordance: false });
|
||||
} else {
|
||||
} else if (typeof command === 'object') {
|
||||
let {title, isCloseAffordance} = command;
|
||||
items.push({ title, isCloseAffordance, handle });
|
||||
} else {
|
||||
console.warn('Invalid message item:', command);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user