Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #13722 from NejcZdovc/fix/#12826-url
Browse files Browse the repository at this point in the history
Fixes invalid url error
  • Loading branch information
NejcZdovc committed Apr 18, 2018
1 parent 5096262 commit a268969
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ module.exports.request = (options, callback) => {
})
}

if (typeof options.url !== 'string') {
return callback(new Error('URL is not valid'))
}

if (process.env.NODE_ENV === 'development' &&
urlParse(options.url).protocol === 'http:') {
console.log('WARNING: requesting non-HTTPS URL', options.url)
Expand Down

0 comments on commit a268969

Please sign in to comment.