Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[expo-router] prevent generating types in a loop (expo#29157)
# Why Likely fixes expo#28248 Several people on [Discord](https://discord.com/channels/695411232856997968/1241672799710347345/1242593907657801738) reported that after working on a newly created project, it keeps refreshing after a while. It's reliably reproducible with: ``` npx create-expo-app npm run ios npm run reset-project ``` <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How The `throttle` function used for `regenerateDeclarations` didn't reset `shouldRunAgain` back to false, so it actually ends up calling the function in a loop. <!-- How did you build this feature or fix this bug and why? --> # Test Plan <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> Try the steps to reproduce with this fix applied - it no longer runs the function in a loop. # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
- Loading branch information