File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
packages/core/src/openbim/IDSSpecifications/src/facets Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments