Skip to content

Commit

Permalink
Merge pull request #47 from depeele/master
Browse files Browse the repository at this point in the history
Protect the use of document to resolve SSR issues.
  • Loading branch information
zoltanszogyenyi authored Dec 18, 2024
2 parents a343785 + edcaa78 commit 473d622
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/lib/dom.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const range = document.createRange();
let range = null;

export function parseHTML(html) {
if (range == null) { range = document.createRange() }
return range.createContextualFragment(html);
}

Expand Down

0 comments on commit 473d622

Please sign in to comment.