|
|
@ -307,16 +307,15 @@ export async function invokeWebhook( |
|
|
|
const data = newData[i]; |
|
|
|
const data = newData[i]; |
|
|
|
const prevData = prevData ? prevData[i] : null; |
|
|
|
const prevData = prevData ? prevData[i] : null; |
|
|
|
|
|
|
|
|
|
|
|
if (prevData) { |
|
|
|
// if condition is satisfied for prevData then return
|
|
|
|
// if condition is satisfied for prevData then return
|
|
|
|
if ( |
|
|
|
if ( |
|
|
|
prevData && |
|
|
|
await validateCondition( |
|
|
|
(await validateCondition( |
|
|
|
testFilters || (await hook.getFilters()), |
|
|
|
testFilters || (await hook.getFilters()), |
|
|
|
prevData, |
|
|
|
prevData, |
|
|
|
) |
|
|
|
)) |
|
|
|
) { |
|
|
|
) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if ( |
|
|
|
if ( |
|
|
|
await validateCondition( |
|
|
|
await validateCondition( |
|
|
@ -332,16 +331,15 @@ export async function invokeWebhook( |
|
|
|
} |
|
|
|
} |
|
|
|
newData = filteredData; |
|
|
|
newData = filteredData; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (prevData) { |
|
|
|
// if condition is satisfied for prevData then return
|
|
|
|
// if condition is satisfied for prevData then return
|
|
|
|
if ( |
|
|
|
if ( |
|
|
|
prevData && |
|
|
|
await validateCondition( |
|
|
|
(await validateCondition( |
|
|
|
testFilters || (await hook.getFilters()), |
|
|
|
testFilters || (await hook.getFilters()), |
|
|
|
prevData, |
|
|
|
prevData, |
|
|
|
) |
|
|
|
)) |
|
|
|
) { |
|
|
|
) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if ( |
|
|
|
if ( |
|
|
|
!(await validateCondition( |
|
|
|
!(await validateCondition( |
|
|
|