File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
components/quickbooks/sources Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,15 @@ module.exports = {
8484 } = entity ;
8585 const relevantEntities = this . getEntities ( ) ;
8686 const relevantOperations = this . getOperations ( ) ;
87-
88- if ( ! relevantEntities . includes ( name ) ) {
87+
88+ // only emit events that match the entity names and operations indicated by the user
89+ // but if the props are left empty, emit all events rather than filtering them all out
90+ // (it would a hassle for the user to select every option if they wanted to emit everything)
91+ if ( relevantEntities ?. length > 0 && ! relevantEntities . includes ( name ) ) {
8992 console . log ( `Skipping '${ operation } ${ name } ' event. (Accepted entities: ${ relevantEntities . join ( ", " ) } )` ) ;
9093 return false ;
9194 }
92- if ( ! relevantOperations . includes ( operation ) ) {
95+ if ( ! relevantOperations ?. length > 0 && ! relevantOperations . includes ( operation ) ) {
9396 console . log ( `Skipping '${ operation } ${ name } ' event. (Accepted operations: ${ relevantOperations . join ( ", " ) } )` ) ;
9497 return false ;
9598 }
You can’t perform that action at this time.
0 commit comments