Skip to content

Commit

Permalink
fix crash device_array
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucky-ESA committed Jan 6, 2024
1 parent e4270ff commit 9c2791d
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 @@ -369,7 +369,7 @@ class LgThinq extends utils.Adapter {
if (Object.keys(result.workList).length == 0) {
this.updatethinq1Run = false;
return;
} else if (Object.keys(result.workList).length == 1 && !Array.isArray(result.workList)) {
} else if (Object.keys(result.workList).length == 1 && !Array.isArray(result.workList) && typeof result.workList === "object") {
device_array.push(result.workList);
} else if (Array.isArray(result.workList)) {
device_array = result.workList;
Expand Down

0 comments on commit 9c2791d

Please sign in to comment.