@pushwoosh/dumb-components 1.1.168 → 1.1.169

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.
@@ -36,13 +36,14 @@ export function EmailTemplatePreview(props) {
36
36
  } = props;
37
37
  const [liquidInstance] = useState(createLiquidInstance);
38
38
  const src = useMemo(() => {
39
+ let withDynamicContent = template;
39
40
  try {
40
41
  const withLocalization = replaceLocalization(template, localization);
41
- const withDynamicContent = replacePlaceholders(withLocalization, values);
42
+ withDynamicContent = replacePlaceholders(withLocalization, values);
42
43
  return liquidInstance.parseAndRenderSync(withDynamicContent, values);
43
44
  } catch (e) {
44
45
  console.error('Error in PreviewIframe', e);
45
- return `<body style="font-size: 24px; color: darkred">${e.message}</body>`;
46
+ return withDynamicContent;
46
47
  }
47
48
  }, [template, localization, values, liquidInstance]);
48
49
  return _jsx(IframeStyled, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.168",
3
+ "version": "1.1.169",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",