lib/assets/javascripts/extensions.coffee in material_raingular-0.1.5.9 vs lib/assets/javascripts/extensions.coffee in material_raingular-0.1.6.0
- old
+ new
@@ -45,10 +45,10 @@
Array.prototype.includes = (entry)->
unless entry.hasOwnProperty('id')
return @.indexOf(entry) > -1
@.pluck('id').includes(entry.id)
Array.prototype.drop = (entry)->
- if entry.hasOwnProperty('id')
+ if (entry || {}).hasOwnProperty('id')
index = @.pluck('id').indexOf(entry.id)
else
index = @.indexOf(entry)
return this unless index > -1
@.splice(index,1)