Skip to content

Commit

Permalink
fixed query logic error
Browse files Browse the repository at this point in the history
  • Loading branch information
goruck committed Feb 25, 2019
1 parent 5e2c052 commit 8c00ed1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws-lambda/alexa-smart-zoneminder/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -922,9 +922,9 @@ function findLatestAlarms(queryParams, callback) {
// If a face or object name was given try to find it in item; skip all others.
// Object name is ignored if face is given since it has to be a person.
if (faceName !== null) {
if (item.Labels.some(label => label.Face !== faceName)) continue;
if (!item.Labels.some(label => label.Face === faceName)) continue;
} else if (objectName !== null) {
if (item.Labels.some(label => label.Name !== objectName)) continue;
if (!item.Labels.some(label => label.Name === objectName)) continue;
}
lastZmEventId = item.ZmEventId;
foundAlarms.push(item);
Expand Down

0 comments on commit 8c00ed1

Please sign in to comment.