Skip to content

Commit

Permalink
Calculate struct_has_fabric_sensitive_fields only at the top level, n…
Browse files Browse the repository at this point in the history
…ot transitively
  • Loading branch information
gmarcosb committed Jan 6, 2025
1 parent 2fa580a commit 16524ef
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src-electron/generator/helper-zcl.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ async function zcl_structs(options) {
if (i.isArray) {
st.struct_contains_array = true
}
if (i.isFabricSensitive) {
st.struct_has_fabric_sensitive_fields = true
}
if (
!st.struct_contains_array ||
!st.struct_has_fabric_sensitive_fields
Expand All @@ -176,7 +173,11 @@ async function zcl_structs(options) {
await Promise.all(promises)
}
}

for (const i of items) {
if (i.isFabricSensitive) {
st.struct_has_fabric_sensitive_fields = true
}
}
await checkTransitive(st.items)
}
if (checkForDoubleNestedArray) {
Expand Down

0 comments on commit 16524ef

Please sign in to comment.