Skip to content

Commit

Permalink
Eia::Interchange handle empty response
Browse files Browse the repository at this point in the history
  • Loading branch information
intermittentnrg committed Sep 23, 2024
1 parent d2c6ebd commit 2c2cdfa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/eia.rb
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ def points
}
end
end
return [] if r.empty?
@from = r.values.min { |a,b| a[:time]<=>b[:time] }[:time]
@to = r.values.max { |a,b| a[:time]<=>b[:time] }[:time]
#require 'pry' ; binding.pry
Expand Down

0 comments on commit 2c2cdfa

Please sign in to comment.