Skip to content

Commit

Permalink
prevent writing empty settings
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Jan 2, 2023
1 parent 5ee49d8 commit 718ede8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/framework/FSPersistence.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class FSPersistence {
File settingsFile = _fs->open(_filePath, "w");

// failed to open file, return false
if (!settingsFile) {
if (!settingsFile || !jsonObject.size()) {
#if defined(EMSESP_DEBUG)
#if defined(EMSESP_USE_SERIAL)
Serial.println();
Expand Down

0 comments on commit 718ede8

Please sign in to comment.