diy-template-components 0.2.47 → 0.2.48

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.
package/build/index.js CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
 
4
4
 
5
- function ___$insertStyle(css) {
6
- if (!css || typeof window === 'undefined') {
7
- return;
8
- }
9
- const style = document.createElement('style');
10
- style.setAttribute('type', 'text/css');
11
- style.innerHTML = css;
12
- document.head.appendChild(style);
13
- return css;
5
+ function ___$insertStyle(css) {
6
+ if (!css || !window) {
7
+ return;
8
+ }
9
+ const style = document.createElement('style');
10
+ style.setAttribute('type', 'text/css');
11
+ style.innerHTML = css;
12
+ document.head.appendChild(style);
13
+ return css;
14
14
  }
15
15
 
16
16
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1156,7 +1156,7 @@ const NextImageRenderer = ({
1156
1156
  refSetter,
1157
1157
  className
1158
1158
  } = props;
1159
- if (isCustomWebsite) {
1159
+ if (isCustomWebsite && typeof Image !== 'undefined') {
1160
1160
  const classes = nextImageRendererStyles();
1161
1161
  const imageLoader = ({
1162
1162
  src,
@@ -1171,9 +1171,8 @@ const NextImageRenderer = ({
1171
1171
  return `${process.env.NEXT_PUBLIC_ENV_ASSET_PREFIX}/_next/image?url=${src}&q=${quality || 75}&w=${dynamicWidth}`;
1172
1172
  };
1173
1173
  const NextImage = require('next/image').default;
1174
- console.log('next image succes');
1175
1174
  return /*#__PURE__*/React__default["default"].createElement(NextImage, _extends({
1176
- priority: sectionIndex === '0' ? true : false,
1175
+ priority: sectionIndex == '0' ? true : false,
1177
1176
  loader: imageLoader,
1178
1177
  src: src,
1179
1178
  layout: 'fill',
@@ -1183,7 +1182,6 @@ const NextImageRenderer = ({
1183
1182
  alt: "image"
1184
1183
  }));
1185
1184
  } else {
1186
- console.log('next image failed image tag');
1187
1185
  return /*#__PURE__*/React__default["default"].createElement("img", {
1188
1186
  ref: refSetter,
1189
1187
  className: className,