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

Commit 566bfde

Browse files
committed
refactor(root-build-in-helper.ts): sync buildIn
1 parent 4525021 commit 566bfde

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@ let resolveGlobalStyleSheet: (value: [string, string?]) => void;
44
let globalStyleSheetPromise: Promise<[string, string?]>;
55

66
function createGlobalStyleSheetPromise() {
7-
globalStyleSheetPromise = new Promise<[string, string?]>((resolve) => {
7+
globalStyleSheetPromise = new Promise<[string, string?]>(resolve => {
88
resolveGlobalStyleSheet = resolve;
99
});
1010
}
1111

1212
export async function rootBuildIn(): Promise<void> {
1313
if (typeof globalStyleSheetPromise === 'undefined') createGlobalStyleSheetPromise();
1414
const [styleSheet, option] = await globalStyleSheetPromise;
15-
if (!isDevelopment && styleSheet) {
16-
if (option) buildIn(styleSheet, option);
17-
else buildIn(styleSheet);
18-
}
15+
if (!isDevelopment && styleSheet) buildIn(styleSheet, option);
1916
createGlobalStyleSheetPromise();
2017
}
2118

0 commit comments

Comments
 (0)