diff --git a/lib/getMapping.js b/lib/getMapping.js index 785e3ed..1aaa51b 100644 --- a/lib/getMapping.js +++ b/lib/getMapping.js @@ -8,11 +8,11 @@ const { SourceMapConsumer } = require('source-map'); */ module.exports = function getMapping(sourceMap, location) { /* istanbul ignore if: edge case too hard to test for with babel malformation */ - if (location.start.line < 1 || location.start.column < 0) { + if (!location.start.line || location.start.line < 1 || location.start.column < 0) { return null; } /* istanbul ignore if: edge case too hard to test for with babel malformation */ - if (location.end.line < 1 || location.end.column < 0) { + if (!location.end.line || location.end.line < 1 || location.end.column < 0) { return null; }