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

Not work: destruct function arguments with immutable objects #13

Open
erictsangx opened this issue Jul 27, 2016 · 3 comments
Open

Not work: destruct function arguments with immutable objects #13

erictsangx opened this issue Jul 27, 2016 · 3 comments

Comments

@erictsangx
Copy link

function read({a, b, c}) {
    console.info(a) //ppp
    console.info(b) //11
}
read({a: "ppp", b: 11})
function read({a, b, c}) {
    console.info(a) //undefined
    console.info(b) //undefined
}
read(fromJS({a: "ppp", b: 11}))

Now I have to destruct immutable objects inside the functions and it works prefectly:

function read(obj) {
   const {a,b} = obj
 ...
}
@brunolemos
Copy link

+1

@hendrul
Copy link

hendrul commented Nov 21, 2017

Whyyy!!!? ....
:D no seriously why this hasn't been fixed yet?

@hleumas
Copy link
Contributor

hleumas commented Nov 28, 2017

@hendrul maybe because you haven't submitted your pull request yet?

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

4 participants