mirror of
https://github.com/OpenFusionProject/Client.git
synced 2024-11-23 05:50:09 +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() {
|
||||
let current = fs.readJsonSync(versionsPath);
|
||||
let newDefaults = fs.readJsonSync(
|
||||
var current = fs.readJsonSync(versionsPath);
|
||||
var newDefaults = fs.readJsonSync(
|
||||
path.join(__dirname, "/defaults/versions.json")
|
||||
);
|
||||
for (let i = 0; i < newDefaults["versions"].length; i++) {
|
||||
const newDefault = newDefaults["versions"][i];
|
||||
let found = false;
|
||||
for (let j = 0; j < current["versions"].length; j++) {
|
||||
let version = current["versions"][j];
|
||||
for (var i = 0; i < newDefaults["versions"].length; i++) {
|
||||
var newDefault = newDefaults["versions"][i];
|
||||
var found = false;
|
||||
for (var j = 0; j < current["versions"].length; j++) {
|
||||
var version = current["versions"][j];
|
||||
if (newDefault["name"] === version["name"]) {
|
||||
current["versions"][j] = newDefault;
|
||||
found = true;
|
||||
@ -63,15 +63,15 @@ function patchVersions() {
|
||||
}
|
||||
|
||||
function patchServers() {
|
||||
let current = fs.readJsonSync(serversPath);
|
||||
let newDefaults = fs.readJsonSync(
|
||||
var current = fs.readJsonSync(serversPath);
|
||||
var newDefaults = fs.readJsonSync(
|
||||
path.join(__dirname, "/defaults/servers.json")
|
||||
);
|
||||
for (let i = 0; i < newDefaults["servers"].length; i++) {
|
||||
const newDefault = newDefaults["servers"][i];
|
||||
let found = false;
|
||||
for (let j = 0; j < current["servers"].length; j++) {
|
||||
let server = current["servers"][j];
|
||||
for (var i = 0; i < newDefaults["servers"].length; i++) {
|
||||
var newDefault = newDefaults["servers"][i];
|
||||
var found = false;
|
||||
for (var j = 0; j < current["servers"].length; j++) {
|
||||
var server = current["servers"][j];
|
||||
if (newDefault["uuid"] === server["uuid"]) {
|
||||
current["servers"][j] = newDefault;
|
||||
found = true;
|
||||
|
Loading…
Reference in New Issue
Block a user