summaryrefslogtreecommitdiff
path: root/node_modules/postcss-reporter/lib/util.js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-11-05 17:23:37 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-11-05 17:23:37 +0800
commit2cdf0cb352ab6a2d0f8cb25120e4ebc92c5316e3 (patch)
tree6b088c99810bd013f17b80522c936ca6dfc09858 /node_modules/postcss-reporter/lib/util.js
parentf8ee6ef722e6c560c4a1c879e04dbdf0b01f0316 (diff)
removed autoprefix hover as it will have a high chance of making hover stopped working
Diffstat (limited to 'node_modules/postcss-reporter/lib/util.js')
-rw-r--r--node_modules/postcss-reporter/lib/util.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/node_modules/postcss-reporter/lib/util.js b/node_modules/postcss-reporter/lib/util.js
index 094b3acc..76c649bc 100644
--- a/node_modules/postcss-reporter/lib/util.js
+++ b/node_modules/postcss-reporter/lib/util.js
@@ -1,4 +1,6 @@
-exports.getLocation = function (message) {
+var _ = require('lodash');
+
+exports.getLocation = function(message) {
var messageNode = message.node;
var location = {
@@ -6,13 +8,12 @@ exports.getLocation = function (message) {
column: message.column,
};
- var messageInput = messageNode && messageNode.source && messageNode.source.input;
+ var messageInput = _.get(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;