Closed mkatrenik closed 8 years ago
Sorry, problem is actually object spread, but in other cases it works.
@mkatrenik does the headers object have a type annotation? I can't replicate this using:
export default function demo (headers) {
const isid = true;
headers = { 'x-user-isid': isid, ...headers };
return headers;
}
nope, zero annotations in project. but the actual code is somObj.headers = { 'x-user-isid': isid, ...headers };
if you still can't replicate it, i will prepare some gist.
@mkatrenik I added a passing test in #84, please would you mind checking out that branch and making that particular test fail? It'd be a big help, thanks.
Ah ok, I see it now...
fixed in 3.4.5
I have this code:
headers = { 'x-user-isid': isid, ...headers };
and it fails withTypeError: ...file.js: Cannot read property 'name' of undefined