Sugarcube 2 keep state after refresh

Actually I’ve just managed to resolve it. After I changed from using importScripts to tweego folder includes (tweego src js/init js/control js/game js/ui -o story.html --watch) I was testing the State.variables caching again and ended up finding that for some reason, the js alias I set up (window.s.v = State.variables) was the issue. I’m still not sure why it was an issue, given the initialisation js still executes…

Also I remembered that I had discussed the importScripts thing here: ImportScripts order of import - #5 by Atawf but never got back to it.

Thank you for your answers!

Edit: So turns out it still isn’t working. The thing that saves data in the State.variables is progressing to another moment/passage. Whereas, I’m just refreshing the passage using Is this a bad way? Should I be using play([currentPassageName])?

Edit2: So yes, using with the current passage does work as way of persisting new data while remaining in the same passage. Please still do let me know if this is bad for any reason (e.g. unexpected consequences). I’m aware of impact on history though.