I want to call a function inside a fetch, but for some reason I get the following error and can't find a solution.
Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'myFunction')
TypeError: Cannot read properties of undefined (reading 'myFunction')
How I should call a function inside the fetch -> then ? Minimalist reproduction at the link below: