fixed added versions not showing up immediately

This commit is contained in:
FinnHornhoover 2023-11-18 00:47:23 +03:00
parent 1078778e16
commit e933bc52fe

View File

@ -331,6 +331,10 @@ function validateCacheLocation() {
function loadGameVersions() {
var versionJson = remotefs.readJsonSync(versionsPath);
versionArray = versionJson["versions"];
$("#addserver-versionselect").empty();
$("#editserver-versionselect").empty();
$.each(versionArray, function (key, value) {
$(new Option(value.name, "val")).appendTo("#addserver-versionselect");
$(new Option(value.name, "val")).appendTo("#editserver-versionselect");
@ -384,8 +388,8 @@ function loadServerList() {
}
function loadCacheList() {
var versionjson = remotefs.readJsonSync(versionsPath);
versionArray = versionjson["versions"];
// we might want to use a new version right away, so reload them
loadGameVersions();
if (!defaultHashes) {
defaultHashes = remotefs.readJsonSync(path.join(