A community member has a JavaScript function that was previously working to parse the URL of the browser, but it has stopped working. The variable "location" is not being populated with any data, and there are no console errors. The community member has commented out some code from earlier experiments. Another community member suggests that the function may not be able to return anything into the Typebot flow, and recommends putting the script on the webpage and passing it through prefilled variables instead. The community members note that the issue started after a recent update, and one member has managed to reproduce the problem. A link to a GitHub commit is provided, which may be related to the issue.
I have the following JS in a Create Variable block that was working fine to parse the URL of the browser but it seems to have stopped working. It was working fine before. The variable "location" is not populating with anything. There are no console errors:
Create Variable block sets first result as currentURL:
I don’t think it’s capable of returning anything into the typebot flow. I do something similar you can put it in the script on the webpage it’s starting from, and pass it through prefilled variables