From 66f085250a5eb69311126f7763ce8fff5f994bde Mon Sep 17 00:00:00 2001 From: tobspr Date: Thu, 20 Jan 2022 14:59:25 +0100 Subject: [PATCH] Fix runBeforeMethod and runAfterMethod --- src/js/mods/mod_interface.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/mods/mod_interface.js b/src/js/mods/mod_interface.js index 5df35563..949e4301 100644 --- a/src/js/mods/mod_interface.js +++ b/src/js/mods/mod_interface.js @@ -424,8 +424,8 @@ export class ModInterface { const oldHandle = classHandle.prototype[methodName]; classHandle.prototype[methodName] = function () { //@ts-ignore Same as above - executeBefore.apply(this, ...arguments); - return oldHandle.apply(this, ...arguments); + executeBefore.apply(this, arguments); + return oldHandle.apply(this, arguments); }; } @@ -442,9 +442,9 @@ export class ModInterface { runAfterMethod(classHandle, methodName, executeAfter) { const oldHandle = classHandle.prototype[methodName]; classHandle.prototype[methodName] = function () { - const returnValue = oldHandle.apply(this, ...arguments); + const returnValue = oldHandle.apply(this, arguments); //@ts-ignore - executeAfter.apply(this, ...arguments); + executeAfter.apply(this, arguments); return returnValue; }; }