Skip to content

Commit

Permalink
add expect require
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayIterator committed Oct 15, 2024
1 parent dd61bef commit 223796f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Gettext/Reader/XMLReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ export default class XMLReader implements GettextReaderInterface {
private parseFromString(content: string) : SimpleDocumentFragment|Document {
let domParser : typeof DOMParser = (window?.DOMParser);
if (!domParser) {
// noinspection TypeScriptUnresolvedReference
// @ts-expect-error ignore
let _require = require || null;
let jsDom = (_require ? _require('jsdom') : null)?.JSDOM;
domParser = (typeof jsDom === 'function' ? (jsDom as {
Expand Down

0 comments on commit 223796f

Please sign in to comment.