Skip to content

Commit 9f50d24

Browse files
authored
another mathjax 4 fix (#86)
* version * fix null element
1 parent c6cc345 commit 9f50d24

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openstax/highlighter",
3-
"version": "1.16.0",
3+
"version": "1.16.1",
44
"main": "dist/index.js",
55
"license": "MIT",
66
"files": [

src/dom.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ export default function dom(el: any) {
226226
},
227227

228228
matches(selector: any) {
229+
if (!el) { return false; }
229230
const method = el.matches || el.mozMatchesSelector || el.msMatchesSelector || el.oMatchesSelector || el.webkitMatchesSelector;
230231
return (method != null ? method.call(el, selector) : undefined);
231232
},

0 commit comments

Comments
 (0)