Skip to content

Commit

Permalink
Remove needless type casts.
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Nov 26, 2020
1 parent 8282be4 commit 48437b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/core/src/server/build-dev.ts
Expand Up @@ -283,8 +283,8 @@ export async function buildDevStandalone(

if (options.smokeTest) {
await outputStats(previewStats, managerStats);
const hasManagerWarnings = managerStats && (managerStats as any).toJson().warnings.length > 0;
const hasPreviewWarnings = previewStats && (previewStats as any).toJson().warnings.length > 0;
const hasManagerWarnings = managerStats && managerStats.toJson().warnings.length > 0;
const hasPreviewWarnings = previewStats && previewStats.toJson().warnings.length > 0;
process.exit(hasManagerWarnings || (hasPreviewWarnings && !options.ignorePreview) ? 1 : 0);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/core/src/server/dev-server.ts
Expand Up @@ -258,7 +258,7 @@ const startManager = async ({
}

if (!managerConfig) {
return {} as ManagerResult;
return {};
}

const compiler = webpack(managerConfig);
Expand Down Expand Up @@ -311,7 +311,7 @@ const startPreview = async ({
outputDir,
}: any): Promise<PreviewResult> => {
if (options.ignorePreview) {
return {} as PreviewResult;
return {};
}

const previewConfig = await loadConfig({
Expand Down

0 comments on commit 48437b7

Please sign in to comment.