lib/botinsta/data/media_data.rb in botinsta-0.1.2 vs lib/botinsta/data/media_data.rb in botinsta-0.1.3
- old
+ new
@@ -9,10 +9,10 @@
@id = data.deep_find('id')
@owner = data.deep_find('owner')['id']
@is_video = data.deep_find('is_video')
@comments_disabled = data.deep_find('comments_disabled')
@text = data.deep_find('text')
- @tags = @text.scan(/#[a-zA-Z0-9]+/)
+ @tags = @text.nil? ? [] : @text.scan(/#[a-zA-Z0-9]+/)
@shortcode = data.deep_find('shortcode')
end
def comments_disabled?
\ No newline at end of file