fix: handle async enhanceApp when extending themes

pull/2104/head
Evan You 1 year ago
parent b0160bc261
commit 52b04f324c

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

Loading…
Cancel
Save