Skip to content

Commit a022667

Browse files
committed
fix: Do not try loading object.values on Node.js 8 and newer
1 parent 6bd2d94 commit a022667

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
'use strict'
2-
31
const { getCommonPathLength } = require('common-path-start')
42
const { readFileSync } = require('fs')
53
const { basename, join, normalize } = require('path')
64

7-
const objectValues = require('object.values')
5+
/* c8 ignore next 4 */
86
if (!Object.values) {
7+
const objectValues = require('object.values')
98
objectValues.shim()
109
}
1110

@@ -96,6 +95,7 @@ module.exports = (results, options) => {
9695
++noticeCount
9796
issues = file.notices
9897
}
98+
/* c8 ignore next 3 */
9999
} else {
100100
issues = []
101101
}

0 commit comments

Comments
 (0)