Skip to content
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

Cannot read property 'url' of undefined #52

Closed
rsahlstrom opened this issue Apr 11, 2017 · 1 comment
Closed

Cannot read property 'url' of undefined #52

rsahlstrom opened this issue Apr 11, 2017 · 1 comment

Comments

@rsahlstrom
Copy link
Contributor

With the latest release (v1.2.0), it now get the following error when I use the UI to switch to a new profile.

bundle.js?v=1.2.1:28 Uncaught (in promise) TypeError: Cannot read property 'url' of undefined
    at t.value (bundle.js?v=1.2.1:28)
    at c._renderValidatedComponentWithoutOwnerOrContext (bundle.js?v=1.2.1:41)
    at c._renderValidatedComponent (bundle.js?v=1.2.1:41)
    at c.performInitialMount (bundle.js?v=1.2.1:41)
    at c.mountComponent (bundle.js?v=1.2.1:41)
    at Object.mountComponent (bundle.js?v=1.2.1:7)
    at Object.updateChildren (bundle.js?v=1.2.1:40)
    at f._reconcilerUpdateChildren (bundle.js?v=1.2.1:42)
    at f._updateChildren (bundle.js?v=1.2.1:42)
    at f.updateChildren (bundle.js?v=1.2.1:42)
    at f._updateDOMChildren (bundle.js?v=1.2.1:41)
    at f.updateComponent (bundle.js?v=1.2.1:41)
    at f.receiveComponent (bundle.js?v=1.2.1:41)

I believe this error was introduced in #41 when Dashboard.js tries to do const profileUrl = this.props.profile.parameters.url. Looking at the code in App.js, _changeProfile finds the profile data from profiles.json and sets that in the state which is then passed to Dashboard. However, profiles.json does not define parameters. It looks like we probably need "parameters":{{ profile.parameters | jsonify }} in profiles.json.

I may be over looking something but that's my best guess. Anyone else seeing this error?

@eduardoboucas
Copy link
Member

Fix released with 1.2.2. Many thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants