Skip to content

Commit 7b61457

Browse files
committed
[Fix] avoid unnecessary polyfill
Fixes #31; introduced in a1af45a
1 parent c32be8e commit 7b61457

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

polyfill.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ module.exports = function getPolyfill() {
1111
if (
1212
descriptor
1313
&& typeof descriptor.get === 'function'
14-
&& typeof RegExp.prototype.dotAll === 'boolean'
15-
&& typeof RegExp.prototype.hasIndices === 'boolean'
14+
&& 'dotAll' in RegExp.prototype
15+
&& 'hasIndices' in RegExp.prototype
1616
) {
1717
/* eslint getter-return: 0 */
1818
var calls = '';
@@ -27,6 +27,9 @@ module.exports = function getPolyfill() {
2727
calls += 'y';
2828
}
2929
});
30+
31+
descriptor.get.call(o);
32+
3033
if (calls === 'dy') {
3134
return descriptor.get;
3235
}

0 commit comments

Comments
 (0)