@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.
@@ -231,8 +231,11 @@ function createDoc(html) {
231
231
  return null;
232
232
  }
233
233
  const cleanedHtml = removeDuplicateAttributes(html);
234
- const doc = DOMParser.parseFromString(`<body>${cleanedHtml}</body>`, "text/html");
235
- return doc;
234
+ try {
235
+ return DOMParser.parseFromString(`<body>${cleanedHtml}</body>`, "text/html");
236
+ } catch {
237
+ return null;
238
+ }
236
239
  }
237
240
  function makeEntryCacheKey(entry) {
238
241
  return `${entry.author}-${entry.permlink}-${entry.last_update}-${entry.updated}`;