From b0d53df61435cea80a6b18ec11ed400c7c20ca1d Mon Sep 17 00:00:00 2001 From: Luke Bartel Date: Tue, 19 Sep 2023 18:06:39 -0600 Subject: [PATCH 1/2] PFG-1980 --- src/utils/promise.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/promise.js b/src/utils/promise.js index 0cf0a47eb8e..afe4a4c8b04 100644 --- a/src/utils/promise.js +++ b/src/utils/promise.js @@ -51,7 +51,7 @@ export class GreedyPromise { const continuation = () => { let value = result[1]; let [handler, resolveFn] = result[0] === SUCCESS ? [onSuccess, resolve] : [onError, reject]; - if (typeof handler === 'function') { + if (typeof handler === 'function' && value !== undefined && value !== null) { try { value = handler(value); } catch (e) { From 9c1f1a2079cbd8dea0740c3d23667715155b84ae Mon Sep 17 00:00:00 2001 From: Luke Bartel Date: Mon, 2 Oct 2023 16:53:54 -0600 Subject: [PATCH 2/2] PFG-1980 promise error update --- src/utils/promise.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/promise.js b/src/utils/promise.js index afe4a4c8b04..5f43735b00f 100644 --- a/src/utils/promise.js +++ b/src/utils/promise.js @@ -51,9 +51,9 @@ export class GreedyPromise { const continuation = () => { let value = result[1]; let [handler, resolveFn] = result[0] === SUCCESS ? [onSuccess, resolve] : [onError, reject]; - if (typeof handler === 'function' && value !== undefined && value !== null) { + if (typeof handler === 'function') { try { - value = handler(value); + handler(value); } catch (e) { reject(e); return;