-
Notifications
You must be signed in to change notification settings - Fork 0
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
TypeError: Cannot convert undefined or null to object #24
Comments
It seems like if this line
blew up because for k, v of dataRealWithExpected then do (k, v) =>
console.log(k, v) translates to var k, v;
for (k in dataRealWithExpected) {
v = dataRealWithExpected[k];
((k, v) => {
return console.log(k, v);
})(k, v);
} Where I believe the |
Surprisingly, iterating over > const obj = undefined;
> for (k in obj) { console.log(k); }
undefined Accessing a property throws a different errorr: > obj['foo']
TypeError: Cannot read property 'foo' of undefined But I got completely the same error if calling > Object.keys(obj)
TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>) That means the line numbers are probably off and the problem raises in these two lines: gavel2html/src/headers-result-converter.coffee Lines 16 to 17 in 99897d7
Both lines are a product of gavel2html/src/headers-result-converter.coffee Lines 13 to 14 in 99897d7
There is a path in code which can result in the data not being an object: gavel2html/src/headers-result-converter.coffee Lines 66 to 67 in 99897d7
However, subsequent code doesn't seem to count with that option. |
So the issue is that headers are set to
|
convert undefined or null to object |
Sometimes gavel2html fails to render the diff for some reason. We're able to see this when using gavel2html internally in apiary.io, but we don't know (yet) what's the exact input to trigger this.
The text was updated successfully, but these errors were encountered: