jlfwong / speedscope

🔬 A fast, interactive web-based viewer for performance profiles.
https://www.speedscope.app
MIT License
5.58k stars 247 forks source link

Fix bug where import after error continues failing #463

Closed tom93 closed 7 months ago

tom93 commented 9 months ago

Steps to reproduce:

  1. Open https://www.speedscope.app/
  2. Try to import an invalid file such as invalid.json. The page says "Something went wrong. Check the JS console for more details."
  3. Now try to import a valid file such as simple.json. The page says "Something went wrong. Check the JS console for more details." even though this second file is valid.

Explanation of the fix (copied from the commit message):

We need to clear the error flag, otherwise once there is an error and we display "Something went wrong" we will keep displaying that forever even when the user imports a valid file.

jlfwong commented 7 months ago

@tom93 thank you!