Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

undefined is not an object (evaluating 'u.refs.targetContainer.refs') #1989

Closed
Plant-for-the-Planet opened this issue Feb 22, 2020 · 2 comments
Labels
bug Something isn't working bugsnag production

Comments

@Plant-for-the-Planet
Copy link
Contributor

Error in Plant-for-the-Planet App

TypeError in MainActivity
undefined is not an object (evaluating 'u.refs.targetContainer.refs')

View on Bugsnag

Stacktrace

app/containers/TargetContainer/index.js:21 - onSubmitTarget
app/components/Common/Button/PrimaryButton.native.js:15 - onPress

View full stacktrace

Created automatically via Bugsnag

@norbertschuler norbertschuler changed the title TypeError in MainActivity undefined is not an object (evaluating 'u.refs.targetContainer.refs') Apr 2, 2020
@norbertschuler
Copy link
Collaborator

Maybe a missing safety check for this.refs.targetContainer.refs?

Bildschirmfoto 2020-04-02 um 12 23 33

@norbertschuler
Copy link
Collaborator

Referencing a form by e.g. this.refs.targetContainer.refs.setTargetForm.validate() does not always seem to work. Therefore we already started to get form references by changing the reference handling like this:

ref={ref => (this.editTreeForm = ref)}

Next time we receive this bug, we should also change this form this way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working bugsnag production
Projects
None yet
Development

No branches or pull requests

2 participants