Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort in SimpleQuery.js behaves differently for undefined vs null #131

Closed
maier49 opened this issue Jun 24, 2015 · 0 comments
Closed

Sort in SimpleQuery.js behaves differently for undefined vs null #131

maier49 opened this issue Jun 24, 2015 · 0 comments
Assignees
Labels

Comments

@maier49
Copy link
Contributor

maier49 commented Jun 24, 2015

The comparison function created in _createSortQuerier behaves differently depending on whether the value of a property is null or undefined. This jsFiddle shows the result, where the undefined value is placed between two defined values after sorting by clicking the first name column.

maier49 added a commit to maier49/dstore that referenced this issue Jun 30, 2015
Fixes SitePen#131 by making the default comparison function created
in _createSortQuerier treat undefined as greater than any
value, and null greater than any other value.
maier49 added a commit to maier49/dstore that referenced this issue Jun 30, 2015
Fixes SitePen#131 by making the default comparison function created
in _createSortQuerier treat undefined as greater than any
value, and null greater than any value besides undefined.
This conveniently places all null and undefined values at
the end of a sorted list.
kfranqueiro pushed a commit that referenced this issue Jun 30, 2015
Fixes #131 by making the default comparison function created in
SimpleQuery#_createSortQuerier treat undefined as greater than any
value, and null greater than any value besides undefined.
This conveniently places all null and undefined values at
the end of a sorted list.

(cherry picked from commit 8453bd1)

Conflicts:
	SimpleQuery.js
	tests/SimpleQuery.js
kfranqueiro pushed a commit that referenced this issue Jun 30, 2015
Fixes #131 by making the default comparison function created in
SimpleQuery#_createSortQuerier treat undefined as greater than any
value, and null greater than any value besides undefined.
This conveniently places all null and undefined values at
the end of a sorted list.

(cherry picked from commit 8453bd1)

Conflicts:
	tests/SimpleQuery.js
kfranqueiro pushed a commit that referenced this issue Jun 30, 2015
Fixes #131 by making the default comparison function created in
SimpleQuery#_createSortQuerier treat undefined as greater than any
value, and null greater than any value besides undefined.
This conveniently places all null and undefined values at
the end of a sorted list.

(cherry picked from commit 8453bd1)
maier49 added a commit to maier49/dstore that referenced this issue Jul 10, 2015
Fixes SitePen#131 by making the default comparison function created in
SimpleQuery#_createSortQuerier treat undefined as greater than any
value, and null greater than any value besides undefined.
This conveniently places all null and undefined values at
the end of a sorted list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants