@gem-sdk/core 2.2.0-staging.29 → 2.2.0-staging.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -296,8 +296,7 @@ const WrapRenderChildren = ({ uid, customProps }, codes)=>{
|
|
|
296
296
|
if (codes?.length) {
|
|
297
297
|
let tempLiquid = '';
|
|
298
298
|
let fileIndex = 0;
|
|
299
|
-
for(
|
|
300
|
-
const code = codes[i];
|
|
299
|
+
for (const code of codes){
|
|
301
300
|
if (code) {
|
|
302
301
|
const textEncoder = new TextEncoder();
|
|
303
302
|
const newTempLiquid = tempLiquid + code;
|
|
@@ -20,10 +20,6 @@ require('swr/mutation');
|
|
|
20
20
|
require('vanilla-lazyload');
|
|
21
21
|
require('../hooks/useCartUI.js');
|
|
22
22
|
|
|
23
|
-
const hasNonEmptyCSSRules = (css)=>{
|
|
24
|
-
const regex = /[^{]+\{\s*\}/g;
|
|
25
|
-
return !regex.test(css);
|
|
26
|
-
};
|
|
27
23
|
const RenderCustomCode = ({ uid, advanced })=>{
|
|
28
24
|
const mode = shop.useEditorMode();
|
|
29
25
|
const { css, javascript, rootClassName } = advanced?.editorData || {};
|
|
@@ -45,7 +41,7 @@ const RenderCustomCode = ({ uid, advanced })=>{
|
|
|
45
41
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
46
42
|
children: [
|
|
47
43
|
/*#__PURE__*/ jsxRuntime.jsx(Head, {
|
|
48
|
-
children: !!css &&
|
|
44
|
+
children: !!css && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
49
45
|
id: mapId['css'],
|
|
50
46
|
dangerouslySetInnerHTML: {
|
|
51
47
|
__html: replacedCSS
|
|
@@ -292,8 +292,7 @@ const WrapRenderChildren = ({ uid, customProps }, codes)=>{
|
|
|
292
292
|
if (codes?.length) {
|
|
293
293
|
let tempLiquid = '';
|
|
294
294
|
let fileIndex = 0;
|
|
295
|
-
for(
|
|
296
|
-
const code = codes[i];
|
|
295
|
+
for (const code of codes){
|
|
297
296
|
if (code) {
|
|
298
297
|
const textEncoder = new TextEncoder();
|
|
299
298
|
const newTempLiquid = tempLiquid + code;
|
|
@@ -16,10 +16,6 @@ import 'swr/mutation';
|
|
|
16
16
|
import 'vanilla-lazyload';
|
|
17
17
|
import '../hooks/useCartUI.js';
|
|
18
18
|
|
|
19
|
-
const hasNonEmptyCSSRules = (css)=>{
|
|
20
|
-
const regex = /[^{]+\{\s*\}/g;
|
|
21
|
-
return !regex.test(css);
|
|
22
|
-
};
|
|
23
19
|
const RenderCustomCode = ({ uid, advanced })=>{
|
|
24
20
|
const mode = useEditorMode();
|
|
25
21
|
const { css, javascript, rootClassName } = advanced?.editorData || {};
|
|
@@ -41,7 +37,7 @@ const RenderCustomCode = ({ uid, advanced })=>{
|
|
|
41
37
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
42
38
|
children: [
|
|
43
39
|
/*#__PURE__*/ jsx(Head, {
|
|
44
|
-
children: !!css &&
|
|
40
|
+
children: !!css && /*#__PURE__*/ jsx("style", {
|
|
45
41
|
id: mapId['css'],
|
|
46
42
|
dangerouslySetInnerHTML: {
|
|
47
43
|
__html: replacedCSS
|