Skip to content

Commit 127468d

Browse files
committed
Do not attempt escape of non-string dependencies
1 parent 5ed83f9 commit 127468d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/url/escape.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
module.exports = function escape(url) {
2+
if (typeof url !== 'string') {
3+
return url
4+
}
25
// If url is already wrapped in quotes, remove them
36
if (/^['"].*['"]$/.test(url)) {
47
url = url.slice(1, -1);

0 commit comments

Comments
 (0)