mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-10-19 21:15:20 +00:00
fix: make ui binds work without args
This commit is contained in:
@@ -33,6 +33,10 @@ namespace ui
|
|||||||
con::error("Webview params are not an array: {}", req);
|
con::error("Webview params are not an array: {}", req);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (json.empty())
|
||||||
|
param = nlohmann::json().get<TInput>();
|
||||||
|
else
|
||||||
param = json.at(0).get<TInput>();
|
param = json.at(0).get<TInput>();
|
||||||
}
|
}
|
||||||
catch (const nlohmann::json::exception& e)
|
catch (const nlohmann::json::exception& e)
|
||||||
@@ -71,6 +75,10 @@ namespace ui
|
|||||||
con::error("Webview params are not an array: {}", req);
|
con::error("Webview params are not an array: {}", req);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (json.empty())
|
||||||
|
param = nlohmann::json().get<TInput>();
|
||||||
|
else
|
||||||
param = json.at(0).get<TInput>();
|
param = json.at(0).get<TInput>();
|
||||||
}
|
}
|
||||||
catch (const nlohmann::json::exception& e)
|
catch (const nlohmann::json::exception& e)
|
||||||
@@ -110,6 +118,10 @@ namespace ui
|
|||||||
con::error("Webview params are not an array: {}", req);
|
con::error("Webview params are not an array: {}", req);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (json.empty())
|
||||||
|
param = nlohmann::json().get<TInput>();
|
||||||
|
else
|
||||||
param = json.at(0).get<TInput>();
|
param = json.at(0).get<TInput>();
|
||||||
}
|
}
|
||||||
catch (const nlohmann::json::exception& e)
|
catch (const nlohmann::json::exception& e)
|
||||||
|
Reference in New Issue
Block a user