mirror of
https://github.com/dkam/openlib.git
synced 2025-12-28 03:04:53 +00:00
Bug fix for book with no authors publishers or subjects
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
openlib (0.1.1)
|
openlib (0.1.2)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ module Openlib
|
|||||||
|
|
||||||
def data_data(req:)
|
def data_data(req:)
|
||||||
case req
|
case req
|
||||||
when :authors, :publishers, :subjects then data.dig(req.to_s).map { |p| p.dig('name') }
|
when :authors, :publishers, :subjects then data.dig(req.to_s)&.map { |p| p.dig('name') }
|
||||||
else
|
else
|
||||||
data.dig(req.to_s)
|
data.dig(req.to_s)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module Openlib
|
module Openlib
|
||||||
VERSION = "0.1.2"
|
VERSION = "0.1.3"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user