Skip to content

Commit

Permalink
Add version.url verification
Browse files Browse the repository at this point in the history
  • Loading branch information
tormozz48 committed Mar 5, 2015
1 parent 125b580 commit e346978
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/model/nodes/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@ VersionNode.prototype.setSource = function (version) {
content: version.readme
},
regExp = /^https?:\/\/(.+?)\/(.+?)\/(.+?)/,
parsedRepo = version.url.match(regExp),
parsedRepo,
repo;

if (version.url) {
parsedRepo = version.url.match(regExp);
}

if (parsedRepo) {
repo = {
host: parsedRepo[1],
Expand Down

0 comments on commit e346978

Please sign in to comment.