if there's no panzoom events on the events.xml, the publish script of presentation was breaking

This commit is contained in:
Felipe Cecagno 2013-03-04 12:52:16 -03:00
parent 37c9149b85
commit 31fa3ec7a1

View File

@ -47,7 +47,7 @@ def processPanAndZooms
y_prev = nil
timestamp_orig_prev = nil
timestamp_prev = nil
last_time = $panzoom_events.last[:timestamp].to_f
last_time = $panzoom_events.last[:timestamp].to_f unless $panzoom_events.empty?
$panzoom_events.each do |panZoomEvent|
# Get variables
timestamp_orig = panZoomEvent[:timestamp].to_f