File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -587,7 +587,6 @@ plugins.register("/i/hook/test", function(ob) {
587587
588588 if ( hookConfig ) {
589589 // Null check for hookConfig
590- const hookConfigEffects = hookConfig . effects ;
591590 if ( hookConfigEffects && ! validateEffects ( hookConfigEffects ) ) {
592591 common . returnMessage ( params , 400 , 'Config invalid' ) ;
593592 }
@@ -598,15 +597,16 @@ plugins.register("/i/hook/test", function(ob) {
598597 const results = [ ] ;
599598
600599 // build mock data
601- const trigger = hookConfig . trigger ;
602- hookConfig . _id = null ;
603- log . d ( "[hook test mock data]" , mockData ) ;
604- const obj = {
605- is_mock : true ,
606- params : mockData ,
607- rule : hookConfig
608- } ;
609-
600+ if ( hookConfig ) {
601+ const trigger = hookConfig ?. trigger ;
602+ hookConfig . _id = null ;
603+ log . d ( "[hook test mock data]" , mockData ) ;
604+ const obj = {
605+ is_mock : true ,
606+ params : mockData ,
607+ rule : hookConfig
608+ } ;
609+ }
610610 log . d ( "[hook test config data]" , obj ) ;
611611 const t = new Triggers [ trigger . type ] ( {
612612 rules : [ hookConfig ] ,
You can’t perform that action at this time.
0 commit comments