Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

DataSet.get([undefined]) returns [null], should return [] instead #2839

Closed
Head opened this issue Mar 7, 2017 · 2 comments
Closed

DataSet.get([undefined]) returns [null], should return [] instead #2839

Head opened this issue Mar 7, 2017 · 2 comments

Comments

@Head
Copy link

Head commented Mar 7, 2017

The documentations says:

When no item is found, null is returned when a single item was requested, and and empty Array is returned in case of multiple id's.

But that's not the case, reading the code at https://github.com/almende/vis/blob/master/lib/DataSet.js#L373 it pushes item to the array no matter what is found.

macleodbroad-wf added a commit to macleodbroad-wf/vis that referenced this issue Jul 27, 2017
@wimrijnders
Copy link
Contributor

wimrijnders commented Jul 28, 2017

Ah, right. I see what you mean. When id's are not found null's are returned in the Array. I consider the documentation to be correct in this case and regard it as a code bug.

I'll spend some time on this. The fix for this particular issue is easy of course, but I also want to add unit tests as well to catch this and as many similar edge cases as possible.

macleodbroad-wf pushed a commit to macleodbroad-wf/vis that referenced this issue Jul 29, 2017
…put/output of get() when passed multiple ids.
yotamberk pushed a commit that referenced this issue Aug 8, 2017
@wimrijnders
Copy link
Contributor

The documentation issue has been resolved by adjusting it to fit the current working.

primozs pushed a commit to primozs/vis that referenced this issue Jan 3, 2019
…put/output of get() when passed multiple ids. (almende#3315)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants