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:
parent
8f5b7f367c
commit
59c0689ade
|
@ -169,7 +169,7 @@ export class LockFileAsync extends LockFileBase {
|
||||||
*/
|
*/
|
||||||
async lock<T>(fn: () => Promise<T>): Promise<T> {
|
async lock<T>(fn: () => Promise<T>): Promise<T> {
|
||||||
await this.create();
|
await this.create();
|
||||||
return await fn().finally(() => this.remove());
|
return fn().finally(() => this.remove());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async create() {
|
protected async create() {
|
||||||
|
|
Loading…
Reference in New Issue