fix negative array size
This commit is contained in:
parent
464debb4f7
commit
8db980ab25
@ -248,7 +248,8 @@ class FeedController < ApplicationController
|
||||
end_time = get_floored_time(feeds.last.created_at, seconds)
|
||||
|
||||
# create empty array with appropriate size
|
||||
timeslices = Array.new(((end_time - start_time) / seconds).floor)
|
||||
timeslices = Array.new((((end_time - start_time) / seconds).abs).floor)
|
||||
|
||||
|
||||
# create a blank clone of the first feed so that we only get the necessary attributes
|
||||
empty_feed = create_empty_clone(feeds.first)
|
||||
|
Loading…
Reference in New Issue
Block a user