From 35fe9ee530b389f9249a7eccc2b0f91dc3cb414e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 20 Sep 2022 22:08:15 +0200 Subject: fix(flash): panic if response if undefined (#15964) Co-authored-by: Divy Srivastava --- ext/flash/01_http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') 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, -- cgit v1.2.3