From 14bb8947539ab68b27ecd8cf3f381a359325edcc Mon Sep 17 00:00:00 2001 From: Mario Nebl Date: Mon, 24 Dec 2018 11:30:20 +0100 Subject: [PATCH] Check if .map.originalPositionFor is a function before executing --- source-map-support.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source-map-support.js b/source-map-support.js index 06ac0f9..112e830 100644 --- a/source-map-support.js +++ b/source-map-support.js @@ -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