Skip to content

Commit 056db91

Browse files
author
Pablo
committed
chore: Updates IDSSepcifications to allow all checks without skipping when fail
(cherry picked from commit 078bea0cef8ceb3a31d257d8e5f65afd13128cc2)
1 parent 60ceb5d commit 056db91

File tree

1 file changed

+10
-5
lines changed
  • packages/core/src/openbim/IDSSpecifications/src/facets

1 file changed

+10
-5
lines changed

packages/core/src/openbim/IDSSpecifications/src/facets/Facet.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,14 @@ export abstract class IDSFacet {
122122
}
123123

124124
let result = modelItemResults.get(item._localId.value);
125-
if (result && skipIfFails) {
126-
// If there are results already and the item didn't pass
127-
// return null to skip further checks
128-
if (!result.pass) return null;
129-
} else {
125+
126+
// If there are results already and the item didn't pass, skip further checks
127+
if (result && skipIfFails && !result.pass) {
128+
return null;
129+
}
130+
131+
// If there are no results for this item, create them
132+
if (!result) {
130133
const checks: IDSItemFacetCheck[] = [];
131134

132135
result = {
@@ -142,6 +145,7 @@ export abstract class IDSFacet {
142145
modelItemResults.set(item._localId.value, result);
143146
}
144147

148+
// Create the checks for the current facet
145149
const checks: IDSCheck[] = [];
146150

147151
const check: IDSItemFacetCheck = {
@@ -155,6 +159,7 @@ export abstract class IDSFacet {
155159
get: () => checks.every(({ pass }) => pass),
156160
});
157161

162+
// Add the current facet check to the item's result
158163
result.checks.push(check);
159164

160165
return check.checks;

0 commit comments

Comments
 (0)