Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions source-map-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,9 @@ function retrieveSourceMap(source) {

// Read the contents of the source map
var sourceMapData;
var dataUrlPrefix = "data:application/json;base64,";
if (sourceMappingURL.slice(0, dataUrlPrefix.length).toLowerCase() == dataUrlPrefix) {
if(/^data:application\/json[^,]+base64,/.test(sourceMappingURL)) {
// Support source map URL as a data url
sourceMapData = new Buffer(sourceMappingURL.slice(dataUrlPrefix.length), "base64").toString();
sourceMapData = new Buffer(sourceMappingURL.slice(sourceMappingURL.indexOf(',')+1), "base64").toString();
sourceMappingURL = null;
} else {
// Support source map URLs relative to the source URL
Expand Down