climbjios-sg / climbjios-app

The community for climbers 🧗
https://www.climbjios.com/
GNU General Public License v3.0
25 stars 4 forks source link

fix: Fix HMR infinitely looping after updating enums #258

Closed lczm closed 1 year ago

lczm commented 1 year ago

Describe your changes

Move enum declarations out of source files. When editing the enum declarations, vite with HMR seems to have an issue propagating the updates throughout the project. This results in the infinite loop seen in the issue. The solution is to just bring the enum declarations out into it's own file. Other enums in the project such as WallName are declared within their own source file as well. HMR can update the tab values without infinitely looping with this change.

Issue ticket number and link

Fixes https://github.com/climbjios-sg/climbjios-app/issues/246

Screenshots (if appropriate):

Checklist before requesting a review

therizhao commented 1 year ago

@all-contributors please add @lczm for code

allcontributors[bot] commented 1 year ago

@therizhao

I've put up a pull request to add @lczm! :tada: