Skip to content

Commit

Permalink
fix: return nil if revision time ends up being zero
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Oct 19, 2023
1 parent 0d38926 commit a247ecd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions variants/backend-base/config/initializers/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
raise StandardError unless File.exist?(path)

File.read(path).chomp
end
Time.zone.at(value.to_i).utc
end.to_i

return nil if value.zero?

Time.zone.at(value).utc
rescue StandardError
nil
end

0 comments on commit a247ecd

Please sign in to comment.