Do not overwrite layoutconfig if it already had one

This commit is contained in:
pengfei.zhou
2022-08-04 14:12:59 +08:00
committed by osborn
parent d886458832
commit ea6e079b4f
5 changed files with 9 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ export namespace jsx {
if (e instanceof Fragment) {
return children
}
e.layoutConfig = layoutConfig().fit()
e.layoutConfig = e.layoutConfig ?? layoutConfig().fit()
if (config) {
e.apply(config)
}