Skip to content

Commit

Permalink
OPT: persistentData via config instead of JSON file
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnpoppen committed Nov 27, 2023
1 parent 93d32ef commit 0dfd78e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/eufysecurity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class EufySecurity extends TypedEmitter<EufySecurityEvents> {
}

try {
if (fse.statSync(this.persistentFile).isFile()) {
if (!this.config.persistentData && fse.statSync(this.persistentFile).isFile()) {
const fileContent = fse.readFileSync(this.persistentFile, "utf8");
this.persistentData = JSON.parse(fileContent) as EufySecurityPersistentData;
}
Expand Down

0 comments on commit 0dfd78e

Please sign in to comment.