Skip to content

Commit 3eb7541

Browse files
authored
Merge pull request #227 from marionebl/fix-harden-structural-typecheck
Check if .map.originalPositionFor is a function before executing
2 parents e77000b + 14bb894 commit 3eb7541

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source-map-support.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ function mapSourcePosition(position) {
210210
}
211211

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

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

0 commit comments

Comments
 (0)