Skip to content

cursor.cursor('path') to immutable.List returns wrong cursor type #318

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

Closed
jeroencranendonk-wf opened this issue Feb 5, 2015 · 6 comments

Comments

@jeroencranendonk-wf
Copy link
Contributor

var data = Immutable.fromJS({ a: [1, 2, 3] });
var cursor = Cursor.from(data);
var deepCursor = cursor.cursor('a');

deepCursor will be KeyedCursor, not IndexedCursor, due to the way subCursor() calls makeCursor() and how makeCursor() checks for optional arguments.
#297 fixes this issue.

@leebyron
Copy link
Collaborator

leebyron commented Feb 6, 2015

Thanks for the report (and the pull request) ((and your patience)).

I'll dig into this and make sure this is fixed and incorporate your pr soon.

@jeroencranendonk-wf
Copy link
Contributor Author

Awesome! Thanks.

@Gozala
Copy link

Gozala commented Feb 8, 2015

I've being bitten by this as, well. I hope it will make into a release soon!

@phated
Copy link

phated commented Feb 15, 2015

Just ran into this, looking forward to the fix.

@jeffbski
Copy link
Contributor

jeffbski commented Mar 8, 2015

+1

@jeffbski
Copy link
Contributor

I posted a slightly revised fix here #381 which uses argument length since undefined might be a legitimate value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants