From 52862758f09d6d58e4c77b2d65b91b84509ad53e Mon Sep 17 00:00:00 2001 From: Ayoub-Mabrouk Date: Sat, 9 Nov 2024 01:43:42 +0100 Subject: [PATCH] refactor: remove unused error parameter from ryRequireAsyncHooks catch block - Simplified ryRequireAsyncHooks by removing the unused error parameter in the catch block. - Updated JSDoc for improved clarity on function behavior. --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e68df7b..aa496dd 100644 --- a/index.js +++ b/index.js @@ -199,13 +199,15 @@ function patchAssignSocket (res, callback) { /** * Try to require async_hooks + * + * @returns {Object} * @private */ function tryRequireAsyncHooks () { try { return require('async_hooks') - } catch (e) { + } catch { return {} } }