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

undefined id error in main.js #14

Open
rohit13k opened this issue Oct 9, 2018 · 2 comments
Open

undefined id error in main.js #14

rohit13k opened this issue Oct 9, 2018 · 2 comments
Assignees
Labels
bug Something isn't working front-end

Comments

@rohit13k
Copy link
Collaborator

rohit13k commented Oct 9, 2018

main.js:990 Uncaught TypeError: Cannot read property '_id' of undefined
at updateMap (main.js:990)
at Object.success (main.js:614)
at c (jquery-1.9.1.min.js:3)
at Object.fireWith [as resolveWith] (jquery-1.9.1.min.js:3)
at k (jquery-1.9.1.min.js:5)
at XMLHttpRequest.r (jquery-1.9.1.min.js:5)

Getting this error in the index page.

@rohit13k rohit13k added bug Something isn't working front-end labels Oct 9, 2018
@mirkomarras
Copy link

Hi Rohit,
I think that this error could be generated when the following events happen:

  1. On the frontend, you select a data source to be visualized.
  2. Then, you select a given time interval.
  3. On the backend, if the DB does not include data for that data source in that time interval, the API returns an empty JSON object.
  4. The frontend tries to access the "_id" property of an empty JSON object, so it generates an error.

@rohit13k
Copy link
Collaborator Author

rohit13k commented Oct 9, 2018

@mirkomarras great thanks it will be easier for us to fix now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working front-end
Projects
None yet
Development

No branches or pull requests

3 participants