From 9d1e625b38adc6c33948726d7e342ebac7119d10 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 16 Oct 2018 19:12:33 +0200 Subject: [PATCH] Store the wrapper by default --- src/dom_components/config/config.js | 2 +- src/dom_components/index.js | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/dom_components/config/config.js b/src/dom_components/config/config.js index 19a17bcf1..95a2492b1 100644 --- a/src/dom_components/config/config.js +++ b/src/dom_components/config/config.js @@ -37,7 +37,7 @@ module.exports = { // structure, but in case you need it you can use this option. // If you have `config.avoidInlineStyle` disabled the wrapper will be stored // as we need to store inlined style. - storeWrapper: 0, + storeWrapper: 1, // List of void elements voidElements: [ diff --git a/src/dom_components/index.js b/src/dom_components/index.js index dc94ac7bd..307cd70f4 100644 --- a/src/dom_components/index.js +++ b/src/dom_components/index.js @@ -349,9 +349,6 @@ module.exports = () => { // If the result is an object I consider it the wrapper if (isObj) { this.getWrapper().set(result); - // .initClasses() - // .loadTraits() - // .initComponents(); } else { this.getComponents().add(result); } @@ -379,8 +376,8 @@ module.exports = () => { if (keys.indexOf('components') >= 0) { const { em } = this; - const storeWrap = - (em && !em.getConfig('avoidInlineStyle')) || c.storeWrapper; + // const storeWrap = (em && !em.getConfig('avoidInlineStyle')) || c.storeWrapper; + const storeWrap = c.storeWrapper; const toStore = storeWrap ? this.getWrapper() : this.getComponents(); obj.components = JSON.stringify(toStore); }