sort() results the whole records when ids.length is 0. #74

Closed
stewartpark opened this Issue Jan 2, 2013 · 0 comments

2 participants

@stewartpark

I think I found a bug that sort() results the whole data when the second parameter is [].

Here's the source code.

models.newsfeed_status.find(
      {
       //some search parameters.
      },
      function(err, ids) {   
        models.newsfeed_status.sort(
        {
            field: 'written_date',
            direction: 'DESC'
        }, ids /* HERE */, function(err, statuses){ 
          // some code
        }); 
      }
  );
@stewartpark stewartpark pushed a commit to stewartpark/nohm that referenced this issue Jan 2, 2013
Ju-yeong Park Fix sort() bug when ids.length is 0. Fixes #74 c68cc40
@stewartpark stewartpark pushed a commit to stewartpark/nohm that referenced this issue Jan 2, 2013
Ju-yeong Park Fix sort() bug when ids.length is 0. Fixes #74 000bc50
@stewartpark stewartpark pushed a commit to stewartpark/nohm that referenced this issue Jan 2, 2013
Ju-yeong Park Added test for bug #74. 47c5399
@stewartpark stewartpark pushed a commit to stewartpark/nohm that referenced this issue Jan 2, 2013
Ju-yeong Park Added test for bug #74. 87f90e6
@maritz maritz added a commit that closed this issue Jan 3, 2013
Ju-yeong Park Fix sort() bug when ids.length is 0. Fixes #74 87642c5
@maritz maritz closed this in 87642c5 Jan 3, 2013
@maritz maritz added a commit that referenced this issue Jan 3, 2013
Ju-yeong Park Added test for bug #74. f3b1198
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment