浏览代码

Removes unneeded async/await

main
Eric Amodio 7 年前
父节点
当前提交
bbc94fb1e1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      src/views/gitExplorer.ts

+ 2
- 2
src/views/gitExplorer.ts 查看文件

@ -163,12 +163,12 @@ export class GitExplorer implements TreeDataProvider {
switch (this._view) {
case GitExplorerView.History: {
const promise = this.getHistoryNode(editor || window.activeTextEditor);
this._loading = promise.then(async _ => await Functions.wait(0));
this._loading = promise.then(_ => Functions.wait(0));
return promise;
}
default: {
const promise = this.git.getRepositories();
this._loading = promise.then(async _ => await Functions.wait(0));
this._loading = promise.then(_ => Functions.wait(0));
const repositories = [...await promise];
if (repositories.length === 0) return undefined; // new MessageNode('No repositories found');

正在加载...
取消
保存