Avoid RegExp when we can use simple JS

This commit is contained in:
Andrey Sitnik
2026-04-07 22:19:16 +00:00
parent 582e47d926
commit ea73bbde2b
+2 -1
View File
@@ -51,7 +51,8 @@ class PreviousMap {
return fromBase64(text.substr(baseUriMatch[0].length))
}
let encoding = text.match(/data:application\/json;([^,]+),/)[1]
let encoding = text.slice('data:application/json;'.length)
encoding = encoding.slice(0, encoding.indexOf(','))
throw new Error('Unsupported source map encoding ' + encoding)
}