Skip to content

Commit d7a1d66

Browse files
authored
Refactor prevStatus assignment logic in boot.js
1 parent 1679f89 commit d7a1d66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/sleeplog/boot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ if (global.sleeplog.conf.enabled) {
293293
timestamp: new Date(data.timestamp),
294294
status: data.status,
295295
consecutive: data.consecutive,
296-
prevStatus: this.status,
296+
prevStatus: data.status === this.status ? undefined : this.status,
297297
prevConsecutive: data.consecutive === this.consecutive ? undefined : this.consecutive
298298
}, (e => {delete e.fn; return e;})(entry.clone()));
299299
});

0 commit comments

Comments
 (0)