Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
[2.1.2] Config edge case fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Akkadius committed Jan 4, 2023
1 parent fcf9f5d commit 8ec264d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.1.2]

* Fix edge case where the server config can possibly be saved with no data

## [2.1.1]

* Launcher adjustment to not grep for process name of "admin" when detecting if the launcher is booted
Expand Down
6 changes: 6 additions & 0 deletions app/core/eqemu-config-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,17 @@ module.exports = {
*/
saveServerConfig(data = undefined) {
if (!data) {
this.reload()
data = this.getServerConfig();
}

debug('[saveServerConfig] writing config');

if (typeof data !== "undefined" && data.length === 0) {
this.reload()
return
}

fs.writeFileSync(
this.getServerConfigPath(),
JSON.stringify(data, null, 1),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eqemu-admin",
"version": "2.1.1",
"version": "2.1.2",
"private": true,
"bin": "./app/bin/admin",
"scripts": {
Expand Down

0 comments on commit 8ec264d

Please sign in to comment.