Skip to content

Commit d2e1f8c

Browse files
committed
fixing logic related to empty timestamp, unless is a fancy if conditional :p
1 parent 2ae5bff commit d2e1f8c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/outbound.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,16 @@ def track user_id, event, properties={}, user_info={}, timestamp
168168
@logger.error "Could not use event properties (#{properties}) given to track call."
169169
end
170170

171-
if timestamp == nil
171+
puts timestamp
172+
173+
unless timestamp == {}
172174
data[:timestamp] = timestamp
173175
else
174176
data[:timestamp] = Time.now.to_i
175177
end
176178

179+
puts data[:timestamp]
180+
177181
return post(@api_key, '/track', data)
178182
end
179183

0 commit comments

Comments
 (0)