Is there an official place to report bugs with the Scriptable app? I’ve found a case where JavaScript gets executed correctly but there’s an error in the console that seems to be a bug.
If you report the bug either here on the forum or send me an e-mail on mail@scriptable.app, I’ll look into it
So having investigated this a bit further it seems to come down to the fact that the defined APIs can be over-written. So not a bug, but it does mean it is possible to prevent the built-in APIs from being available.
let ShareSheet = {};
ShareSheet.present = function(foos) {
console.log("my sharesheet function: " + foos);
}
ShareSheet.present(["foo"]);
Essentially, I got to this because I defined some functions in purescript that compiled down to JavaScript functions with names that clashed with the pre-defined identifiers. I suppose I just need a simple static analysis checkers as part of my purescript build script to throw such a warning at compile time.
Yes, that’s certainly possible. That’s just how JavaScript works
It’s stupid JavaScript stuff like this that makes me use languages like PureScript in the first place. Had a major issue in a web project recently where the truethiness of empty string and empty array are different - because of course that makes sense…