Skip to content

Commit

Permalink
avoid sql errors on statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
tp1de committed Jul 19, 2023
1 parent f111508 commit 273d1f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ async function read_statistics() {

async function stat(db,id,hour,state) {
const end = Date.now();
if (!unloaded) {
if (!unloaded && id != undefined) {
try {
adapter.sendTo(db, "getHistory", { id: id, options: {start: end - (hour*3600000), end: end, aggregate: "none"}
}, function (result) {
Expand Down

0 comments on commit 273d1f7

Please sign in to comment.