mirror of
https://github.com/OpenFusionProject/Client.git
synced 2024-11-14 18:50:04 +00:00
Fix complaints about block-scope declarations
This commit is contained in:
parent
947c231b12
commit
4503c9268e
28
index.js
28
index.js
@ -40,15 +40,15 @@ function backup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function patchVersions() {
|
function patchVersions() {
|
||||||
let current = fs.readJsonSync(versionsPath);
|
var current = fs.readJsonSync(versionsPath);
|
||||||
let newDefaults = fs.readJsonSync(
|
var newDefaults = fs.readJsonSync(
|
||||||
path.join(__dirname, "/defaults/versions.json")
|
path.join(__dirname, "/defaults/versions.json")
|
||||||
);
|
);
|
||||||
for (let i = 0; i < newDefaults["versions"].length; i++) {
|
for (var i = 0; i < newDefaults["versions"].length; i++) {
|
||||||
const newDefault = newDefaults["versions"][i];
|
var newDefault = newDefaults["versions"][i];
|
||||||
let found = false;
|
var found = false;
|
||||||
for (let j = 0; j < current["versions"].length; j++) {
|
for (var j = 0; j < current["versions"].length; j++) {
|
||||||
let version = current["versions"][j];
|
var version = current["versions"][j];
|
||||||
if (newDefault["name"] === version["name"]) {
|
if (newDefault["name"] === version["name"]) {
|
||||||
current["versions"][j] = newDefault;
|
current["versions"][j] = newDefault;
|
||||||
found = true;
|
found = true;
|
||||||
@ -63,15 +63,15 @@ function patchVersions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function patchServers() {
|
function patchServers() {
|
||||||
let current = fs.readJsonSync(serversPath);
|
var current = fs.readJsonSync(serversPath);
|
||||||
let newDefaults = fs.readJsonSync(
|
var newDefaults = fs.readJsonSync(
|
||||||
path.join(__dirname, "/defaults/servers.json")
|
path.join(__dirname, "/defaults/servers.json")
|
||||||
);
|
);
|
||||||
for (let i = 0; i < newDefaults["servers"].length; i++) {
|
for (var i = 0; i < newDefaults["servers"].length; i++) {
|
||||||
const newDefault = newDefaults["servers"][i];
|
var newDefault = newDefaults["servers"][i];
|
||||||
let found = false;
|
var found = false;
|
||||||
for (let j = 0; j < current["servers"].length; j++) {
|
for (var j = 0; j < current["servers"].length; j++) {
|
||||||
let server = current["servers"][j];
|
var server = current["servers"][j];
|
||||||
if (newDefault["uuid"] === server["uuid"]) {
|
if (newDefault["uuid"] === server["uuid"]) {
|
||||||
current["servers"][j] = newDefault;
|
current["servers"][j] = newDefault;
|
||||||
found = true;
|
found = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user