Not work: destruct function arguments with immutable objects
erictsangx opened this issue · 3 comments
erictsangx commented
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 commented
+1
hendrul commented
Whyyy!!!? ....
:D no seriously why this hasn't been fixed yet?