Skip to content

Commit

Permalink
fix: fix using in webworker
Browse files Browse the repository at this point in the history
  • Loading branch information
kekee000 committed Nov 10, 2020
1 parent da8b2d5 commit c4510f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fonteditor-core",
"version": "2.1.4",
"version": "2.1.5",
"description": "fonts (ttf, woff, woff2, eot, svg, otf) parse, write, transform, glyph adjust.",
"keywords": [
"sfnt",
Expand Down
6 changes: 3 additions & 3 deletions src/common/DOMParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
*/

/* eslint-disable no-undef */
export default typeof exports !== 'undefined'
? require('xmldom').DOMParser
: window.DOMParser;
export default typeof window !== 'undefined' && window.DOMParser
? window.DOMParser
: require('xmldom').DOMParser;

0 comments on commit c4510f4

Please sign in to comment.