summaryrefslogtreecommitdiff
path: root/ext/flash/01_http.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-09-20 22:08:15 +0200
committerGitHub <noreply@github.com>2022-09-20 22:08:15 +0200
commit35fe9ee530b389f9249a7eccc2b0f91dc3cb414e (patch)
treec981e552d3210b44927600d96ca7a1c1c39fe1c8 /ext/flash/01_http.js
parent2929ec9ffa70758f5481704e4de975dc61993f74 (diff)
fix(flash): panic if response if undefined (#15964)
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'ext/flash/01_http.js')
-rw-r--r--ext/flash/01_http.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/flash/01_http.js b/ext/flash/01_http.js
index 72c0cb125..faf740f2e 100644
--- a/ext/flash/01_http.js
+++ b/ext/flash/01_http.js
@@ -541,7 +541,7 @@
let resp;
try {
resp = handler(req);
- if (resp instanceof Promise || typeof resp.then === "function") {
+ if (resp instanceof Promise || typeof resp?.then === "function") {
resp.then((resp) =>
handleResponse(
req,