Woops use apply correctly

This commit is contained in:
Vortrex
2022-01-13 17:28:50 -06:00
parent 47cfe37b1b
commit ce63914b36
2 changed files with 7 additions and 3 deletions

View File

@@ -64,7 +64,9 @@ function addNetworkEventHandler(eventName, handlerFunction) {
// ===========================================================================
function sendNetworkEventToServer(eventName, ...args) {
triggerNetworkEvent.apply(null, eventName, args);
let argsArray = [eventName];
argsArray = argsArray.concat(args);
triggerNetworkEvent.apply(null, argsArray);
}
// ===========================================================================