Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit f213259

Browse files
committed
fix(build-in): Eliminate unnecessary async await
1 parent 8c0908c commit f213259

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/_internal/utils/build-in.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as fs from 'fs';
44
import * as path from 'path';
55
import { isServer } from './helper';
66

7-
export const buildIn = async (styleSheet: string, global?: string): Promise<void> => {
7+
export const buildIn = (styleSheet: string, global?: string): void => {
88
const styleFilePath = path.join(__dirname, '../../core/styles/style.module.css');
99
const globalFilePath = path.join(__dirname, '../../core/styles/global.css');
1010

src/core/method/create-build-in-helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function createGlobalStyleSheetPromise() {
1515
}
1616

1717
async function executeBuildIn(styleSheet: string): Promise<void> {
18-
if (!isDevelopment && styleSheet) await buildIn(styleSheet);
18+
if (!isDevelopment && styleSheet) buildIn(styleSheet);
1919
}
2020

2121
async function processStyleSheets() {

src/core/method/global-build-in-helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function createGlobalStyleSheetPromise() {
1515
}
1616

1717
async function executeBuildIn(styleSheet: string, option?: string): Promise<void> {
18-
if (!isDevelopment && styleSheet) await buildIn(styleSheet, option);
18+
if (!isDevelopment && styleSheet) buildIn(styleSheet, option);
1919
}
2020

2121
async function processStyleSheets() {

src/core/method/root-build-in-helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function createGlobalStyleSheetPromise() {
1212
export async function rootBuildIn(): Promise<void> {
1313
if (typeof globalStyleSheetPromise === 'undefined') createGlobalStyleSheetPromise();
1414
const [styleSheet, option] = await globalStyleSheetPromise;
15-
if (!isDevelopment && styleSheet) await buildIn(styleSheet, option);
15+
if (!isDevelopment && styleSheet) buildIn(styleSheet, option);
1616
createGlobalStyleSheetPromise();
1717
}
1818

src/core/method/set-build-in-helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function createGlobalStyleSheetPromise() {
1515
}
1616

1717
async function executeBuildIn(styleSheet: string): Promise<void> {
18-
if (!isDevelopment && styleSheet) await buildIn(styleSheet);
18+
if (!isDevelopment && styleSheet) buildIn(styleSheet);
1919
}
2020

2121
async function processStyleSheets() {

0 commit comments

Comments
 (0)