diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-10-31 15:37:35 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-10-31 15:37:35 +0800 |
| commit | d5f14083061f2ce6a42313188443a42e30796320 (patch) | |
| tree | cc6a9889e08b29595a76a33b9e7b4ef84866468b /node_modules/postcss-reporter/lib/util.js | |
| parent | b1a6ea021f29f182b62f9f81024a3d8ac8621b7f (diff) | |
added make browserlist(autoprefixer) work fixed
Diffstat (limited to 'node_modules/postcss-reporter/lib/util.js')
| -rw-r--r-- | node_modules/postcss-reporter/lib/util.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/node_modules/postcss-reporter/lib/util.js b/node_modules/postcss-reporter/lib/util.js index 76c649bc..094b3acc 100644 --- a/node_modules/postcss-reporter/lib/util.js +++ b/node_modules/postcss-reporter/lib/util.js @@ -1,6 +1,4 @@ -var _ = require('lodash'); - -exports.getLocation = function(message) { +exports.getLocation = function (message) { var messageNode = message.node; var location = { @@ -8,12 +6,13 @@ exports.getLocation = function(message) { column: message.column, }; - var messageInput = _.get(messageNode, 'source.input'); + var messageInput = messageNode && messageNode.source && messageNode.source.input; if (!messageInput) return location; - var originLocation = messageInput.origin && messageInput.origin(message.line, message.column) - if (originLocation) return originLocation + var originLocation = + messageInput.origin && messageInput.origin(message.line, message.column); + if (originLocation) return originLocation; location.file = messageInput.file || messageInput.id; return location; |
