Gatsby is not running the script again on route changes, causing problems when using the same function name in multiple scripts. #38449
Labels
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
Hi, My website has multiple pages, and every page uses a different script. Every script has a single method with the same name. Now when I navigate from one page to another and call the method, it calls the method from the previous page's script. It works fine after reloading the page.
Reproduction Link
Gatsby v5 not supported by CodeSandbox or StackBlitz
Steps to Reproduce
Expected Result
Print the log from the navigated page's script.
Actual Result
Printing log from the last newly loaded page's script.
Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: