Skip to content

Handle cases without localStorage for sorting #944

@AbdealiLoKo

Description

@AbdealiLoKo

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions