use match in one case and remove and operator
This commit is contained in:
@@ -50,7 +50,7 @@ module.exports = UrlAgent = {
|
||||
callback(null, readStream)
|
||||
|
||||
_prependHttpIfNeeded: (url) ->
|
||||
if !/:///.test(url)
|
||||
if !url.match('://')
|
||||
url = 'http://' + url
|
||||
return url
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ define [
|
||||
userAgent &&
|
||||
/.*Safari\/.*/.test(userAgent) &&
|
||||
!/.*Chrome\/.*/.test(userAgent) &&
|
||||
!/.*Chromium\/.*/.test(userAgent) &&
|
||||
!/.*Chromium\/.*/.test(userAgent)
|
||||
)
|
||||
catch err
|
||||
console.error err
|
||||
|
||||
Reference in New Issue
Block a user