Skip to content

Commit

Permalink
fix(index): Guard against non-string types
Browse files Browse the repository at this point in the history
  • Loading branch information
iarna committed Jul 7, 2018
1 parent c931482 commit 5bc580d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var authProtocols = {
var cache = {}

module.exports.fromUrl = function (giturl, opts) {
if (typeof giturl !== 'string') return
var key = giturl + JSON.stringify(opts || {})

if (!(key in cache)) {
Expand Down

0 comments on commit 5bc580d

Please sign in to comment.