Skip to content

Commit

Permalink
Check if .map.originalPositionFor is a function before executing
Browse files Browse the repository at this point in the history
  • Loading branch information
marionebl committed Dec 24, 2018
1 parent 280d34a commit 14bb894
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source-map-support.js
Expand Up @@ -210,7 +210,7 @@ function mapSourcePosition(position) {
}

// Resolve the source URL relative to the URL of the source map
if (sourceMap && sourceMap.map) {
if (sourceMap && sourceMap.map && typeof sourceMap.map.originalPositionFor === 'function') {
var originalPosition = sourceMap.map.originalPositionFor(position);

// Only return the original position if a matching line was found. If no
Expand Down

0 comments on commit 14bb894

Please sign in to comment.