Skip to content

Commit 6917372

Browse files
committed
fix: domparser existence check
1 parent 0c70ea7 commit 6917372

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/web/normalization/prepareHtmlForWeb.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export function prepareHtmlForWeb(html: string) {
2222
* </ul>
2323
*/
2424
function checkboxHtmlToWeb(html: string): string {
25+
if (typeof DOMParser === 'undefined') return html;
26+
2527
const parser = new DOMParser();
2628
const doc = parser.parseFromString(html, 'text/html');
2729

0 commit comments

Comments
 (0)