Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Commit

Permalink
fix: snykio: Check if next link is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
rtfpessoa committed Mar 4, 2019
1 parent 019d31b commit 74ed3eb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
yavdb (0.5.0)
yavdb (0.5.1)
execjs (~> 2.7.0)
json (~> 2.1)
kramdown (~> 1.17)
Expand All @@ -25,7 +25,7 @@ GEM
jaro_winkler (1.5.2)
json (2.1.0)
kramdown (1.17.0)
libv8 (3.16.14.19)
libv8 (3.16.14.19-x86_64-linux)
oga (2.15)
ast
ruby-ll (~> 2.1)
Expand Down
2 changes: 1 addition & 1 deletion lib/yavdb/sources/snyk_io.rb
Expand Up @@ -70,7 +70,7 @@ def fetch_advisory_recursive(page_url)

next_urls = if page_vuln_urls.any?
next_url = snykio.css('a.pagination__next')
if next_url
if next_url&.first
fetch_advisory_recursive(next_url.first.get('href'))
else
[]
Expand Down
2 changes: 1 addition & 1 deletion lib/yavdb/version.rb
Expand Up @@ -16,6 +16,6 @@

module YAVDB

VERSION = '0.5.0'
VERSION = '0.5.1'

end

0 comments on commit 74ed3eb

Please sign in to comment.