From 887dfd7da7e960eaf336208e397cf015faf507f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 30 Aug 2023 11:19:29 -0400 Subject: [PATCH] fix: #11969, match the server side behaviour for filters if there is an error bubble all the way up --- public/src/modules/hooks.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/public/src/modules/hooks.js b/public/src/modules/hooks.js index dbd0af9698..ced19da46b 100644 --- a/public/src/modules/hooks.js +++ b/public/src/modules/hooks.js @@ -106,14 +106,10 @@ define('hooks', [], () => { const listeners = Array.from(Hooks.loaded[hookName]); return listeners.reduce((promise, listener) => promise.then((data) => { - try { - const result = listener(data); - return utils.isPromise(result) ? - result.then(data => Promise.resolve(data)).catch(e => _onHookError(e, listener, data)) : - result; - } catch (e) { - return _onHookError(e, listener, data); - } + const result = listener(data); + return utils.isPromise(result) ? + result.then(data => Promise.resolve(data)) : + result; }), Promise.resolve(data)); };