Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump the local storage key for saved form values (#159)
## Description In #158 I changed the constants that identify projects. I didn't realize this would break the calculator for users who had the old constants in local storage (as saved form values). This is the simplest solution: change the local storage key for saved form values, which will effectively clear the stored values for everyone, one time. There's no attempt to migrate the old values. We would have to support that code indefinitely (unless we eventually cleared storage anyway), and I don't think there's a ton of value in preserving form prefills. The old key will still be there in users' local storage; if we want, we can follow up with a change to delete it. ## Test Plan Before making this change, reproed the problem by manually editing local storage and changing the `RA-calc-form-values` value to have the old constant `heat_pump_clothes_dryer` in the `projects` field. Submit the form and make sure there was an error (trying to read `shortLabel` of `undefined`). Apply this change, make sure the form is reset to defaults, and submitting it doesn't cause an error, and results show up.
- Loading branch information