Skip to content

Commit 2cd5784

Browse files
author
Sebastian Jura
authored
Fix #3015: Ignore empty string in executeBrowserJavascript (#3016)
1 parent 84ea6c9 commit 2cd5784

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Client/mods/deathmatch/logic/luadefs/CLuaBrowserDefs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ int CLuaBrowserDefs::ExecuteBrowserJavascript(lua_State* luaVM)
459459

460460
if (!argStream.HasErrors())
461461
{
462-
if (pWebBrowser->ExecuteJavascript(strJavascriptCode))
462+
if (strJavascriptCode.empty() || pWebBrowser->ExecuteJavascript(strJavascriptCode))
463463
{
464464
lua_pushboolean(luaVM, true);
465465
return 1;

0 commit comments

Comments
 (0)