Bug fix: support recordings with no fill attribute
This script is failing for older recordings with no fill attribute. In that case,`event.at_xpath('fill')` is `nil`, failing once `.text` on `nil` is called.
This commit is contained in:
parent
e14392fb26
commit
14df8d110a
@ -610,7 +610,8 @@ def events_parse_shape(shapes, event, current_presentation, current_slide, times
|
||||
end
|
||||
if shape[:type] == 'rectangle' or
|
||||
shape[:type] == 'ellipse' or shape[:type] == 'triangle'
|
||||
fill = event.at_xpath('fill').text
|
||||
fill = event.at_xpath('fill')
|
||||
fill = fill.nil? ? "false" : fill.text
|
||||
shape[:fill] = fill =~ /true/ ? true : false
|
||||
end
|
||||
if shape[:type] == 'rectangle'
|
||||
|
Loading…
Reference in New Issue
Block a user