提交 ee7de5d4 编写于 作者: J Joao Moreno

use boolean instead of number

上级 ed153774
......@@ -69,17 +69,17 @@ export class MainThreadMessageService extends MainThreadMessageServiceShape {
}
private showModalMessage(severity: Severity, message: string, commands: { title: string; isCloseAffordance: boolean; handle: number; }[]): Thenable<number> {
let closeAffordanceIndex = -1;
let hasCloseAffordance = false;
const options = commands.map((command, index) => {
if (command.isCloseAffordance === true) {
closeAffordanceIndex = index;
hasCloseAffordance = true;
}
return command.title;
});
if (closeAffordanceIndex === -1) {
if (!hasCloseAffordance) {
if (options.length > 0) {
options.push(nls.localize('cancel', "Cancel"));
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册