Permalink
Browse files

Don't check first? if already present

  • Loading branch information...
1 parent d71f340 commit 239104172bf2ee4f9f60618d1babf8489994be66 @oriolgual oriolgual committed Apr 13, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/resort.rb
View
@@ -93,7 +93,7 @@ def ordered
elements = {}
scoped.each do |element|
- if element.first?
+ if ordered_elements.empty? && element.first?
ordered_elements << element
else
elements[element.id] = element

0 comments on commit 2391041

Please sign in to comment.