Skip to content

Commit

Permalink
build/url.js: fix replace() not defined for URL
Browse files Browse the repository at this point in the history
Input.origin passes URL object rather than strings, our shim doesn't
handle this case.

Fixes #194
  • Loading branch information
albb0920 committed Nov 5, 2020
1 parent 2f383af commit 0b3939c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/url.js
Expand Up @@ -3,6 +3,6 @@ module.exports = Object.assign(
require("rollup-plugin-node-polyfills/polyfills/url.js"),
{
pathToFileURL: (path)=> { return `file:///${encodeURIComponent(path)}` },
fileURLToPath: (fileURL)=> { return decodeURIComponent(fileURL.replace(/^file:\/\/\//, '')) }
fileURLToPath: (fileURL)=> { return decodeURIComponent(fileURL.toString().replace(/^file:\/\/\//, '')) }
}
)
4 changes: 2 additions & 2 deletions vendor/autoprefixer.js

Large diffs are not rendered by default.

0 comments on commit 0b3939c

Please sign in to comment.