Skip to content

Commit

Permalink
fix(reporting): fix reporting rule validation
Browse files Browse the repository at this point in the history
  • Loading branch information
nurikk committed Sep 27, 2022
1 parent 0d6586c commit ce20ed1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/device-page/reporting-row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const getClusters = (device: Device, endpoint: Endpoint, currentCluster: Cluster
}
const requiredRuleFiled = ['maximum_report_interval', 'minimum_report_interval', 'reportable_change', 'endpoint', 'cluster', 'attribute'];
const isValidRule = (rule: NiceRepointingRule): boolean => {
return requiredRuleFiled.every(field => rule[field] !== undefined)
return requiredRuleFiled.every(field => (rule[field] !== undefined) && (rule[field] !== '') )
}

type FormGroupInputProps = {
Expand Down

0 comments on commit ce20ed1

Please sign in to comment.