Skip to content

Commit 80b94ad

Browse files
clydinhansl
authored andcommitted
refactor(@angular-devkit/build-angular): correct implicit returns
1 parent c12d3ee commit 80b94ad

File tree

1 file changed

+7
-7
lines changed
  • packages/angular_devkit/build_angular/src/app-shell

1 file changed

+7
-7
lines changed

packages/angular_devkit/build_angular/src/app-shell/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,13 @@ export class AppShellBuilder implements Builder<BuildWebpackAppShellSchema> {
168168
document: indexHtml,
169169
url: options.route,
170170
})
171-
.then((html: string) => {
172-
return this.context.host
171+
.then(async (html: string) => {
172+
await this.context.host
173173
.write(outputIndexPath, virtualFs.stringToFileBuffer(html))
174174
.toPromise();
175-
})
176-
.then(() => {
175+
177176
if (browserOptions.serviceWorker) {
178-
return augmentAppWithServiceWorker(
177+
await augmentAppWithServiceWorker(
179178
this.context.host,
180179
root,
181180
projectRoot,
@@ -184,8 +183,9 @@ export class AppShellBuilder implements Builder<BuildWebpackAppShellSchema> {
184183
browserOptions.ngswConfigPath,
185184
);
186185
}
187-
})
188-
.then(() => ({ success: true })),
186+
187+
return { success: true };
188+
}),
189189
);
190190
}),
191191
);

0 commit comments

Comments
 (0)