diff --git a/lib/wikidata/snak.rb b/lib/wikidata/snak.rb index 2ffe44a..f5f2f8a 100644 --- a/lib/wikidata/snak.rb +++ b/lib/wikidata/snak.rb @@ -11,7 +11,9 @@ def property def value @value ||= begin - if datavalue['type'] == "wikibase-entityid" + if snaktype == "somevalue" + Wikidata::DataValues::String.new({string: "Unknown"}) + elsif datavalue['type'] == "wikibase-entityid" Wikidata::DataValues::Entity.new(datavalue.value) elsif datavalue['type'] == "time" Wikidata::DataValues::Time.new(datavalue.value)