diff options
author | jjanzen <jjanzen@jjanzen.ca> | 2025-01-16 23:48:31 -0600 |
---|---|---|
committer | jjanzen <jjanzen@jjanzen.ca> | 2025-01-16 23:48:31 -0600 |
commit | ae976a0caa71c692ecc9bbbfe2610419580cad1e (patch) | |
tree | e4e64767c813c6134e98f6ff43e73d87eaa55269 | |
parent | 0046702a0bd54de2bdbc489b1d5c83d709ad078b (diff) |
fix crash on invalid res
-rw-r--r-- | app.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -52,7 +52,8 @@ function handle_application_command(state, data, channel_id) { default: console.error(`unknown command: ${name}`); - return res.status(400).json({ error: "unknown command" }); + if (res) return res.status(400).json({ error: "unknown command" }); + else return null; } } |