Photoshop UXP Selection

Could you add console.log("BEFORE") before the const result = ...?
It looks like it doesn’t even get to console.log(result). Feels like it silently fails on BP