Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
gmarcosb and bzbarsky-apple authored Jan 9, 2025
1 parent 522d953 commit 56af968
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src-electron/generator/helper-zcl.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,19 @@ async function zcl_structs(options) {
st.has_no_clusters = st.struct_cluster_count < 1
st.has_one_cluster = st.struct_cluster_count == 1
st.has_more_than_one_cluster = st.struct_cluster_count > 1
const checkTransitive = async (items) => {
const checkForArraysTransitively = async (items) => {
let promises = []
for (const i of items) {
if (i.isArray) {
st.struct_contains_array = true
}
if (
!st.struct_contains_array ||
!st.struct_has_fabric_sensitive_fields
!st.struct_contains_array
) {
promises.push(
queryZcl
.selectAllStructItemsById(this.global.db, i.dataTypeReference)
.then((sis) => {
checkTransitive(sis)
})
.then(checkTransitive)
)
}
}
Expand Down

0 comments on commit 56af968

Please sign in to comment.