Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/get_format.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function detectModuleFormat(source, url) {
*/
function getDataProtocolModuleFormat(parsed) {
const { 1: mime } = RegExpPrototypeExec(
/^([^/]+\/[^;,]+)(?:[^,]*?)(;base64)?,/,
/^([^/]+\/[^;,]+)(?:;[^,]*)?,/,
parsed.pathname,
) || [ null, null, null ];

Expand Down
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function throwIfUnsupportedURLScheme(parsed) {
*/
function throwUnknownModuleFormat(url, format) {
const dataUrl = RegExpPrototypeExec(
/^data:([^/]+\/[^;,]+)(?:[^,]*?)(;base64)?,/,
/^data:([^/]+\/[^;,]+)(?:;[^,]*)?,/,
url,
);

Expand Down