Skip to content

Commit

Permalink
Do not query product info for items without a title or a thumbnail.
Browse files Browse the repository at this point in the history
  • Loading branch information
FMaz008 committed Oct 11, 2024
1 parent 0577d2d commit 9b2b2ad
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions scripts/bootloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,13 +476,16 @@ function getAllProductsData() {
const enrollmentGUID = btn.dataset.recommendationId.match(/#vine\.enrollment\.([a-f0-9-]+)/i)[1];
const title = getTitleFromDom(obj);
const thumbnail = getThumbnailURLFromDom(obj);
arrUrl.push({
asin: asin,
title: title,
thumbnail: thumbnail,
is_parent_asin: isParent,
enrollment_guid: enrollmentGUID,
});
//Do not query product info for product without a title or a thumbnail.
if (title && thumbnail) {
arrUrl.push({
asin: asin,
title: title,
thumbnail: thumbnail,
is_parent_asin: isParent,
enrollment_guid: enrollmentGUID,
});
}
}
return arrUrl;
}
Expand Down

0 comments on commit 9b2b2ad

Please sign in to comment.