Skip to content

orderBy not working with null values #69

Open
@jordanbrowneb

Description

@jordanbrowneb

We're getting some really weird behavior when using orderBy on arrays with null in them.

Below is a test case running linq 3.2.1 on node 10.15.3.

const Enumerable = require('linq');

const data = ['2019-10-01', null, '2019-09-12', '2019-09-15', null];
const result = Enumerable.from(data).orderBy(x => x).toArray();

result.forEach(x => console.log(x));

Expected output:

null
null
2019-09-12
2019-09-15
2019-10-01

Actual output:

2019-10-01
null
2019-09-12
2019-09-15
null

Thanks in advance for any help you can provide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions