Skip to content

Commit

Permalink
fix: unable to write Cache Config, Cannot set properties of null
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanho committed Dec 2, 2024
1 parent b4e5c67 commit 4a9882a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ const NodeHeleprObject = {
try {
let config = {};
const configStr = await this.readFileSafe(this.CACHE_CONFIG, "Cache Config");
config = JSON.parse(configStr || null);
config = JSON.parse(configStr || null) || {};
config[key] = value;
await this.writeFileSafe(this.CACHE_CONFIG, JSON.stringify(config, null, 4), "Cache Config");
this.log_debug("Cache Config saved");
Expand Down

0 comments on commit 4a9882a

Please sign in to comment.