mirror of
https://github.com/hanzoai/postcss.git
synced 2026-09-24 17:01:56 +00:00
Avoid RegExp when we can use simple JS
This commit is contained in:
+2
-1
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user