Skip to content

Commit

Permalink
fix: Do not try loading object.values on Node.js 8 and newer
Browse files Browse the repository at this point in the history
  • Loading branch information
prantlf committed May 27, 2022
1 parent 6bd2d94 commit a022667
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
'use strict'

const { getCommonPathLength } = require('common-path-start')
const { readFileSync } = require('fs')
const { basename, join, normalize } = require('path')

const objectValues = require('object.values')
/* c8 ignore next 4 */
if (!Object.values) {
const objectValues = require('object.values')
objectValues.shim()
}

Expand Down Expand Up @@ -96,6 +95,7 @@ module.exports = (results, options) => {
++noticeCount
issues = file.notices
}
/* c8 ignore next 3 */
} else {
issues = []
}
Expand Down

0 comments on commit a022667

Please sign in to comment.