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

Throws error on burst image capture when user inputs bad expression index #16

Open
japamat0 opened this issue Jun 12, 2019 · 1 comment

Comments

@japamat0
Copy link
Contributor

Description:
Type Error thrown when trying capture burst of images on certain graphs, reads 'cannot read property 'match' of undefined.

the GraphingCalculator.getExpressions() method from the API returns an array of expressions on the current state of the calculator, though not every object element of the array returned has a property latex, compare 0 & 1 below:
Screen Shot 2019-06-12 at 3 56 28 PM

For context
Screen Shot 2019-06-12 at 3 57 21 PM

Possible Fix
Add a conditional statement to ensure that the retrieved expression has the latex property, otherwise return 'null'

Reproduction Steps:

  1. Go to gifsmos.com
  2. Paste in the following URL https://www.desmos.com/calculator/cbt18evgoe
  3. Click Burst icon to open the burst capture panel & click capture
  4. Error will appear in console, screenshot below

Screen Shot 2019-06-12 at 3 48 52 PM

@japamat0
Copy link
Contributor Author

japamat0 commented Jun 13, 2019

UPDATE:
setSliderByIndex() for valid index should also check expression object is of type expression before trying match

@japamat0 japamat0 changed the title Throws error on burst image capture for certain graphs Throws error on burst image capture when user inputs bad expression index Jun 13, 2019
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

1 participant