Skip to content

Commit 7260280

Browse files
authored
feat: only process product with valid new hash (#91)
1 parent acc2eaf commit 7260280

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

actions/check-product-changes/poller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ function unpublishAndDelete(batches, locale, adminApi) {
196196
*/
197197
function shouldProcessProduct(product) {
198198
const { urlKey, lastModifiedDate, lastPreviewDate, currentHash, newHash } = product;
199-
return urlKey?.match(/^[a-zA-Z0-9-]+$/) && lastModifiedDate >= lastPreviewDate && currentHash !== newHash;
199+
return urlKey?.match(/^[a-zA-Z0-9-]+$/) && lastModifiedDate >= lastPreviewDate && newHash && currentHash !== newHash;
200200
}
201201

202202
/**

0 commit comments

Comments
 (0)