await
is calling the .then
method, which is how this is actually working? So, yes, if that's true, there are obviously plenty of ways that you can break it. Although I don't know how the .then
method could tell it's being called implicitly by await
or explicitly, unless JavaScript code has a way of checking its own call stack at runtime (sometimes called "reflection").