fix: handle async enhanceApp when extending themes

pull/2104/head
Evan You 2 years ago
parent b0160bc261
commit 52b04f324c

@ -25,9 +25,9 @@ function resolveThemeExtends(theme: typeof RawTheme): typeof RawTheme {
return {
...base,
...theme,
enhanceApp(ctx) {
if (base.enhanceApp) base.enhanceApp(ctx)
if (theme.enhanceApp) theme.enhanceApp(ctx)
async enhanceApp(ctx) {
if (base.enhanceApp) await base.enhanceApp(ctx)
if (theme.enhanceApp) await theme.enhanceApp(ctx)
}
}
}

Loading…
Cancel
Save