fix for iqdb queries

This commit is contained in:
Albert Yi
2016-12-02 13:06:34 -08:00
parent a358247c1c
commit 8e5331d234
3 changed files with 4 additions and 4 deletions

View File

@@ -33,9 +33,9 @@ module Iqdb
if resp.is_a?(Net::HTTPSuccess)
json = JSON.parse(resp.body)
if json.is_a?(Array)
json
@matches = json
else
[]
@matches = []
end
else
raise "HTTP error code: #{resp.code} #{resp.message}"