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

_.collections.walk is broken #53

Open
verticalpalette opened this issue Feb 6, 2017 · 1 comment
Open

_.collections.walk is broken #53

verticalpalette opened this issue Feb 6, 2017 · 1 comment

Comments

@verticalpalette
Copy link

verticalpalette commented Feb 6, 2017

> var _ = require('lodash-contrib');
Expression assignment to _ now disabled.
undefined
> _.walk.preorder({a: {b: true}}, function(x, y, z) { console.log(x); });
{ a: { b: true } }
TypeError: _.any is not a function
    at _walk (/Users/daniel/Code/src/github.com/trythings/trythings/node_modules/lodash-contrib/common-js/_.collections.walk.js:48:22)
    at walkImpl (/Users/daniel/Code/src/github.com/trythings/trythings/node_modules/lodash-contrib/common-js/_.collections.walk.js:56:7)
    at Object.preorder (/Users/daniel/Code/src/github.com/trythings/trythings/node_modules/lodash-contrib/common-js/_.collections.walk.js:145:7)
    at Function.wrapper [as preorder] (/Users/daniel/Code/src/github.com/trythings/trythings/node_modules/lodash/lodash.js:4968:19)
    at repl:1:8
    at realRunInThisContextScript (vm.js:22:35)
    at sigintHandlersWrap (vm.js:98:12)
    at ContextifyScript.Script.runInThisContext (vm.js:24:12)
    at REPLServer.defaultEval (repl.js:346:29)
    at bound (domain.js:280:14)

The problem is that walkImpl calls _.any, but _.any was removed in lodash@4.0.0 in favor of _.some (https://github.com/lodash/lodash/wiki/Changelog#v400).

I'm not sure why the tests for _.collections.walk don't catch this.

@rbinsztock
Copy link

Hi

I already added a PR for this : #54 waiting to be merged, you can use my fixed fork if you want : https://github.com/rbinsztock/lodash-contrib

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

No branches or pull requests

2 participants