mongoid/mongoid-geospatial

demongoize a missing point throws and error

camallen opened this issue · 1 comments

New 2.2.0 release Point.rb#demongoize L26 when trying to demongoize a nil object will throw an error accessing the [0] (and [1]) elements of a nil object.

You commented out the return unless object && !object.empty? code. Perhaps just rescue with nil instead of returning if the object is empty as this is what was returned previously.

Thoughts?

Done, thanks for the help.