Skip to content

Commit 3bd9b4b

Browse files
committed
Don't lean on startsWith support
1 parent ca8f6cb commit 3bd9b4b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

source-map-support.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ var retrieveFile = handlerExec(retrieveFileHandlers);
6464
retrieveFileHandlers.push(function(path) {
6565
// Trim the path to make sure there is no extra whitespace.
6666
path = path.trim();
67-
if (path.startsWith('file:')) {
67+
if (/^file:/.test(path)) {
6868
// existsSync/readFileSync can't handle file protocol, but once stripped, it works
6969
path = path.replace(/file:\/\/(\w:\\|\/)/, '');
7070
}

0 commit comments

Comments
 (0)