1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-13 02:01:51 +00:00

Fix runBeforeMethod and runAfterMethod

This commit is contained in:
tobspr 2022-01-20 14:59:25 +01:00
parent 1c585986d2
commit 66f085250a

View File

@ -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;
};
}