From 59c0689ade62a7af45a07e84d21a97e85d3df0f4 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 26 Feb 2020 11:16:12 +0100 Subject: [PATCH] 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 --- packages/compiler-cli/ngcc/src/execution/lock_file.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-cli/ngcc/src/execution/lock_file.ts b/packages/compiler-cli/ngcc/src/execution/lock_file.ts index 38883beeec..a9a98d209a 100644 --- a/packages/compiler-cli/ngcc/src/execution/lock_file.ts +++ b/packages/compiler-cli/ngcc/src/execution/lock_file.ts @@ -169,7 +169,7 @@ export class LockFileAsync extends LockFileBase { */ async lock(fn: () => Promise): Promise { await this.create(); - return await fn().finally(() => this.remove()); + return fn().finally(() => this.remove()); } protected async create() {