diff --git a/doric-js/bundle/doric-lib.es5.js b/doric-js/bundle/doric-lib.es5.js index 8a518539..34d932af 100644 --- a/doric-js/bundle/doric-lib.es5.js +++ b/doric-js/bundle/doric-lib.es5.js @@ -3028,6 +3028,7 @@ exports.jsx = void 0; function createElement(constructor, config) { var arguments$1 = arguments; + var _a; var children = []; for (var _i = 2; _i < arguments.length; _i++) { children[_i - 2] = arguments$1[_i]; @@ -3037,7 +3038,7 @@ exports.jsx = void 0; if (e instanceof Fragment) { return children; } - e.layoutConfig = layoutConfig().fit(); + e.layoutConfig = (_a = e.layoutConfig) !== null && _a !== void 0 ? _a : layoutConfig().fit(); if (config) { e.apply(config); } diff --git a/doric-js/bundle/doric-lib.js b/doric-js/bundle/doric-lib.js index 1dd23bfc..df2bde7f 100644 --- a/doric-js/bundle/doric-lib.js +++ b/doric-js/bundle/doric-lib.js @@ -2301,12 +2301,13 @@ exports.Display = void 0; exports.jsx = void 0; (function (jsx) { function createElement(constructor, config, ...children) { + var _a; if (!!constructor.isViewClass) { const e = new constructor(); if (e instanceof Fragment) { return children; } - e.layoutConfig = layoutConfig().fit(); + e.layoutConfig = (_a = e.layoutConfig) !== null && _a !== void 0 ? _a : layoutConfig().fit(); if (config) { e.apply(config); } diff --git a/doric-js/bundle/doric-vm.js b/doric-js/bundle/doric-vm.js index f04dbc60..28e2f5c0 100644 --- a/doric-js/bundle/doric-vm.js +++ b/doric-js/bundle/doric-vm.js @@ -3831,12 +3831,13 @@ exports.Display = void 0; exports.jsx = void 0; (function (jsx) { function createElement(constructor, config, ...children) { + var _a; if (!!constructor.isViewClass) { const e = new constructor(); if (e instanceof Fragment) { return children; } - e.layoutConfig = layoutConfig().fit(); + e.layoutConfig = (_a = e.layoutConfig) !== null && _a !== void 0 ? _a : layoutConfig().fit(); if (config) { e.apply(config); } diff --git a/doric-js/lib/src/util/jsx.js b/doric-js/lib/src/util/jsx.js index 9733186c..347f1fe0 100644 --- a/doric-js/lib/src/util/jsx.js +++ b/doric-js/lib/src/util/jsx.js @@ -3,12 +3,13 @@ import { layoutConfig } from "./layoutconfig"; export var jsx; (function (jsx) { function createElement(constructor, config, ...children) { + var _a; if (!!constructor.isViewClass) { const e = new constructor(); if (e instanceof Fragment) { return children; } - e.layoutConfig = layoutConfig().fit(); + e.layoutConfig = (_a = e.layoutConfig) !== null && _a !== void 0 ? _a : layoutConfig().fit(); if (config) { e.apply(config); } diff --git a/doric-js/src/util/jsx.ts b/doric-js/src/util/jsx.ts index ef03224f..4e414ca5 100644 --- a/doric-js/src/util/jsx.ts +++ b/doric-js/src/util/jsx.ts @@ -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) }