Skip to content

Commit 2e1194b

Browse files
committed
fix tests
1 parent 667028d commit 2e1194b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ const tlds = require('tlds');
44
/* istanbul ignore next */
55
const SafeRegExp = (() => {
66
try {
7-
return require('re2');
7+
const RE2 = require('re2');
8+
return typeof RE2 === 'function' ? RE2 : RegExp;
89
} catch {
910
return RegExp;
1011
}

0 commit comments

Comments
 (0)