From 1533dee0a35ad630f41c3a54ec05a94fe8ac7976 Mon Sep 17 00:00:00 2001 From: harryadel Date: Tue, 17 Sep 2024 12:16:15 +0300 Subject: [PATCH] Remove semi-colons --- find.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/find.js b/find.js index 2134324..3f20979 100644 --- a/find.js +++ b/find.js @@ -19,28 +19,28 @@ CollectionHooks.defineWrapper('find', function (userId, _super, instance, hooks, // Wrap async cursor methods ASYNC_METHODS.forEach((method) => { if (cursor[method]) { - const originalMethod = cursor[method]; + const originalMethod = cursor[method] cursor[method] = async function (...args) { - let abort = false; + let abort = false for (const hook of hooks.before) { - const result = await hook.hook.call(this, userId, selector, options); + const result = await hook.hook.call(this, userId, selector, options) if (result === false) { - abort = true; + abort = true } } // Modify the existing cursor instead of creating a new one - this.selector = abort ? undefined : selector; - this.options = options; + this.selector = abort ? undefined : selector + this.options = options - const result = await originalMethod.apply(this, args); + const result = await originalMethod.apply(this, args) for (const hook of hooks.after) { - await hook.hook.call(this, userId, selector, options, this); + await hook.hook.call(this, userId, selector, options, this) } - return result; - }; + return result + } } })