Skip to content

Commit fd4f409

Browse files
authored
Update list-comments.js
Correct a bug, where stars on additionnal products on a product page would have wrong star number, because the stars where inited before the grade retrivial
1 parent 92a7480 commit fd4f409

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

views/js/list-comments.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,16 @@ jQuery(document).ready(function () {
3939
const nextCount = totalPages + 1;
4040
const gapText = '…';
4141

42-
$('.grade-stars').rating();
42+
$('#product-comments-list .grade-stars').rating();
43+
$('.product-comments-additional-info .grade-stars').rating();
4344

4445
prestashop.on('updatedProduct', function() {
4546
$('.product-comments-additional-info .grade-stars').rating();
4647
})
4748

4849
document.addEventListener('updateRating', function() {
49-
$('.grade-stars').rating();
50+
$('#product-comments-list .grade-stars').rating();
51+
$('.product-comments-additional-info .grade-stars').rating();
5052
});
5153

5254
const updateCommentPostErrorModal = $('#update-comment-usefulness-post-error');

0 commit comments

Comments
 (0)