Return the value from GuiPoll

This commit is contained in:
phosit
2024-11-11 21:54:58 +01:00
parent f23dde2f73
commit cfb742c914
3 changed files with 8 additions and 15 deletions
@@ -198,12 +198,7 @@ CStr GetPlayerGUID()
JS::Value PollNetworkClient(const ScriptRequest& rq)
{
if (!g_NetClient)
return JS::UndefinedValue();
JS::RootedValue message{rq.cx};
g_NetClient->GuiPoll(rq, &message);
return message;
return g_NetClient ? g_NetClient->GuiPoll(rq) : JS::UndefinedValue();
}
void SendGameSetupMessage(const ScriptInterface& scriptInterface, JS::HandleValue attribs1)