mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-09 16:09:08 +00:00
use match in one case and remove and operator
This commit is contained in:
parent
4d991aa176
commit
465b9aefc5
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue