refactor(ngcc): remove redundant await (#35686)

Inside an async function, return await is not needed. Since the return value of an async function is always wrapped in Promise.resolve,
PR Close #35686
This commit is contained in:
Alan Agius 2020-02-26 11:16:12 +01:00 committed by Miško Hevery
parent 8f5b7f367c
commit 59c0689ade
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ export class LockFileAsync extends LockFileBase {
*/
async lock<T>(fn: () => Promise<T>): Promise<T> {
await this.create();
return await fn().finally(() => this.remove());
return fn().finally(() => this.remove());
}
protected async create() {