@ecency/render-helper 2.4.29 → 2.4.30

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.
@@ -202,8 +202,11 @@ function createDoc(html) {
202
202
  return null;
203
203
  }
204
204
  const cleanedHtml = removeDuplicateAttributes(html);
205
- const doc = DOMParser.parseFromString(`<body>${cleanedHtml}</body>`, "text/html");
206
- return doc;
205
+ try {
206
+ return DOMParser.parseFromString(`<body>${cleanedHtml}</body>`, "text/html");
207
+ } catch {
208
+ return null;
209
+ }
207
210
  }
208
211
  function makeEntryCacheKey(entry) {
209
212
  return `${entry.author}-${entry.permlink}-${entry.last_update}-${entry.updated}`;