Skip to content

Commit

Permalink
Do not match on name if name is unset
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisroberts committed May 20, 2015
1 parent 9e8e448 commit a165837
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/miasma/types/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def model
def perform_get(ident)
all.detect do |obj|
obj.id == ident ||
(obj.respond_to?(:name) && obj.name == ident)
(obj.respond_to?(:name) && !obj.name.nil? && obj.name == ident)
end
end

Expand Down

0 comments on commit a165837

Please sign in to comment.