Skip to content

Commit 23a2822

Browse files
fix: typo in product scoring (#6792)
* fix: typo in product scoring
1 parent 6749369 commit 23a2822

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

html/js/product-search.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ function match_product_to_preferences (product, product_preferences) {
110110

111111
// Normalize the score from 0 to 100
112112
if (sum_of_factors === 0) {
113-
score /= sum_of_factors;
114-
} else {
115113
score = 0;
114+
} else {
115+
score /= sum_of_factors;
116116
}
117117

118118
// If one of the attributes does not match, the product does not match

0 commit comments

Comments
 (0)