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

Handle cases without localStorage for sorting #944

Closed
AbdealiLoKo opened this issue Feb 24, 2020 · 3 comments · Fixed by #945
Closed

Handle cases without localStorage for sorting #944

AbdealiLoKo opened this issue Feb 24, 2020 · 3 comments · Fixed by #945
Labels
enhancement New feature or request fixed html

Comments

@AbdealiLoKo
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I was recently trying to make my browser more "secure" by locking some domains from accessing cookies etc. And I found that somehow I broke coverage's HTML report.
I was surprised, because I didn't expect coverage to need any form of storage ...
On digging further I saw that localStorage was being used to persist the sorting column

Describe the solution you'd like
If localStorage was causing an error for some reason - don't save the column that was used for sorting and just sort by the default column

Describe alternatives you've considered
Enabling localStorage for coverage is obviously an option :)
And something I'm going to do right now - but I'm not sure if its a good idea for coverage to throw an error in case it was unable to do just sorting ...
Note: If this JS error occurs, I can't do any sorting (even temporarily on this page)

@AbdealiLoKo AbdealiLoKo added the enhancement New feature or request label Feb 24, 2020
@nedbat
Copy link
Owner

nedbat commented Feb 24, 2020

Thanks, this is a good idea. Do you want to make a pull request?

@nedbat
Copy link
Owner

nedbat commented Feb 29, 2020

This is fixed in 48c73b8

@nedbat nedbat added the fixed label Mar 9, 2020
@nedbat
Copy link
Owner

nedbat commented Mar 17, 2020

This is now available in coverage v5.0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed html
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants