-
Notifications
You must be signed in to change notification settings - Fork 725
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
fix - JS error "values of undefined" on a missing reference in a column #751
Conversation
scope.value = scope.entry.values[scope.field.name()]; | ||
scope.value = typeof scope.entry === 'undefined' | ||
? '' | ||
: scope.entry.values[scope.field.name()]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scope.value = scope.entry.values ? scope.entry.values[scope.field.name()] : '';
is better IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not that .values is undefined, it's that .entry is undefined, so the one-liner will still end up with Uncaught TypeError: Cannot read property 'values' of undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as for relying on truethiness vs. checking typeof, this could turn into a holy war which is far from my intent, so whichever is consistent with the project's guidelines is fine by me.
I really don't understand why the build fails on this PR. I've restarted it three times. Could you try rebasing on master? |
75ef3ab
to
9b1d8a7
Compare
rebased, still same failure. I have no idea what's causing it. |
fix - JS error "values of undefined" on a missing reference in a column
OK, merging with hope that the faulty CI worker was only on your branch... |
Thanks. This is so weird. I can't explain it. |
fixes #750