External Events with JS code and "use strict"

Hello all.

I’m using External Events to put my custom JS code and then by using Functions I can call the code. This worked in a past project fine, but in the current project I was getting reference errors when calling the function.

Comparing the two projects, I noticed that when I export the old project for Cordova, in the code0.js file I don’t get a “use strict;” injected in the code. This is not the case for the new project, in which I do get this injected and it results in errors. I tried exporting the old project a few times and every time I didn’t get the “use strict” command. On the new project I get this command every time I export it.

Any idea what is happening here?

Anyone knows under which circumstances GDvelops injects a “user strict;” command at the top of custom JS code? I have two projects using custom JS code as external events. One project gets the “use strict;” injected, the other one doesn’t .