Skip to content

Commit

Permalink
adding undefined check
Browse files Browse the repository at this point in the history
  • Loading branch information
jue-henry committed Dec 10, 2024
1 parent 0bc48b4 commit 8fabe38
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@
"typescript": "^5.4.4",
"undici": "^6.0.0"
}
}
}
8 changes: 4 additions & 4 deletions src/api/db/models/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export function buildTagPipeline(tags: string[]): PipelineStage[] {

pipeline.push({
$match: {
tags: { $in: tags }
}
tags: { $in: tags },
},
});

return pipeline
return pipeline;
}

export function buildLabelPipeline(labels: string[]): PipelineStage[] {
Expand Down Expand Up @@ -194,7 +194,7 @@ export function buildPipeline(
}

// match reviewedFilter
if (reviewed !== null) {
if (reviewed !== null && reviewed !== undefined) {
pipeline.push({
$match: {
reviewed: reviewed,
Expand Down
1 change: 0 additions & 1 deletion src/task/camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export async function DeleteCamera(task: TaskInput<gql.DeleteCameraInput>) {
config: {
filters: {
cameras: [task.config.cameraId],
labels: null,
},
},
type: 'DeleteImagesByFilter',
Expand Down

0 comments on commit 8fabe38

Please sign in to comment.