Thanks to visit codestin.com
Credit goes to github.com

Skip to content

handle undefined when sorting quick help#8131

Merged
takluyver merged 1 commit into
ipython:masterfrom
minrk:sort-help
Mar 24, 2015
Merged

handle undefined when sorting quick help#8131
takluyver merged 1 commit into
ipython:masterfrom
minrk:sort-help

Conversation

@minrk

@minrk minrk commented Mar 24, 2015

Copy link
Copy Markdown
Member

Since undefined is neither less than nor greater than anything in Javascript, the sort function was treating it as equal to everything, causing inconsistent behavior depending on the sort algorithm of the browser.

closes #8089

This ensures undefined elements are sorted last in the sequence.

since undefined is neither less than nor greater than
anything in Javascript,
the sort function was treating it as equal to everything, causing inconsistent behavior,
depending on the sort algorithm of the browser.

This ensures undefined elements are sorted last in the sequence.
@takluyver

Copy link
Copy Markdown
Member

This makes sense, and I've confirmed that it fixes the issue for me.

takluyver added a commit that referenced this pull request Mar 24, 2015
handle undefined when sorting quick help
@takluyver takluyver merged commit befcaa9 into ipython:master Mar 24, 2015
@takluyver takluyver mentioned this pull request Mar 24, 2015
@takluyver takluyver added this to the 3.1 milestone Mar 24, 2015
minrk added a commit that referenced this pull request Mar 25, 2015
Since undefined is neither less than nor greater than anything in Javascript, the sort function was treating it as equal to everything, causing inconsistent behavior depending on the sort algorithm of the browser.

closes #8089

This ensures undefined elements are sorted last in the sequence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run commands should be grouped together in help

2 participants