Window.open() in run Javascript Function block opens a lot of tabs

I tried running it in development mode. It still opened a lot of tabs. But this time, the console did not show any errors, and the Snap editor was not crashing.