Skip to content

Commit

Permalink
Merge pull request #227 from marionebl/fix-harden-structural-typecheck
Browse files Browse the repository at this point in the history
Check if .map.originalPositionFor is a function before executing
  • Loading branch information
LinusU committed Jan 11, 2019
2 parents e77000b + 14bb894 commit 3eb7541
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 3eb7541

Please sign in to comment.