We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 106819d commit 008fd2fCopy full SHA for 008fd2f
lib/getMapping.js
@@ -8,11 +8,11 @@ const { SourceMapConsumer } = require('source-map');
8
*/
9
module.exports = function getMapping(sourceMap, location) {
10
/* istanbul ignore if: edge case too hard to test for with babel malformation */
11
- if (location.start.line < 1 || location.start.column < 0) {
+ if (!location.start.line || location.start.line < 1 || location.start.column < 0) {
12
return null;
13
}
14
15
- if (location.end.line < 1 || location.end.column < 0) {
+ if (!location.end.line || location.end.line < 1 || location.end.column < 0) {
16
17
18
0 commit comments