Skip to content

Commit

Permalink
Fix bug that caused webhook validation to always pass
Browse files Browse the repository at this point in the history
  • Loading branch information
ajluker committed May 1, 2024
1 parent c48ea46 commit edf4bb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/webhooks/utils/validateLineItemsAndCallHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const validateLineItemsAndCallHandler = async (
variantsFromPayload.map((v) => v.variantId)
]);

if (variantsFromDB?.rows?.length === 0) {
if (variantsFromDB?.length < 1) {
return {
statusCode: 200,
body: 'Webhook - validateLineItemsAndCallHandler: No matching variants found'
Expand Down

0 comments on commit edf4bb1

Please sign in to comment.