Skip to content

Commit 9fe6bc8

Browse files
committed
Merge pull request mathjax#182 from mathjax/issue172
Make test for node hierarchy more robust.
2 parents 46350d0 + 117d5b8 commit 9fe6bc8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/patch/jsdom.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@
33
// between node 4 and node 5, so check which one we have.
44
//
55

6-
var fs = require('fs');
7-
8-
var PARSERS = 'jsdom/node_modules/cssstyle/lib/parsers.js'; // node 4 hierarchy
9-
try {fs.accessSync('node_modules/'+PARSERS, fs.F_OK)} catch (e) {
10-
PARSERS = 'cssstyle/lib/parsers.js'; // node 5 heirarchy
11-
}
6+
var PARSERS = 'jsdom/node_modules/cssstyle/lib/parsers.js'; // node 4 hierarchy
7+
try {require(PARSERS)} catch (e) {PARSERS = 'cssstyle/lib/parsers.js'} // node 5 heirarchy
128

139
//
1410
// Companion to implicitSetter, but for the individual parts.

0 commit comments

Comments
 (0)