Return undefined if dialog is cancelled (#122234)

This commit is contained in:
Ladislau Szomoru
2021-04-27 00:28:25 +02:00
committed by GitHub
parent 8b15a01d8e
commit 480f3c0b35
7 changed files with 10 additions and 10 deletions

View File

@@ -562,7 +562,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac
return this._trusted;
}
requestWorkspaceTrust(options?: vscode.WorkspaceTrustRequestOptions): Promise<boolean> {
requestWorkspaceTrust(options?: vscode.WorkspaceTrustRequestOptions): Promise<boolean | undefined> {
const promise = this._proxy.$requestWorkspaceTrust(options);
return options?.modal ? promise : Promise.resolve(this._trusted);
}