ninjasort / react-star-rating

[Looking for Maintainers (email me)]: A simple star rating component built with React.
MIT License
173 stars 55 forks source link

TypeError: currentRating.toFixed is not a function #45

Closed lieferbaer closed 4 years ago

lieferbaer commented 4 years ago

link: https://qwrqwr.de/productListing/delivery/76133/Kaiserallee%201,%2076133%20Karlsruhe/2

click to rated star in the middle.

get node_modules/react-star-ratings/build/star-ratings.js:136

133 | var hoveredRating = this.state.highestStarHovered; 134 | var currentRating = hoveredRating > 0 ? hoveredRating : selectedRating; 135 | // fix it at 2 decimal places and remove trailing 0s

136 | var formattedRating = parseFloat(currentRating.toFixed(2)).toString(); | ^ 137 | if (Number.isInteger(currentRating)) { 138 | formattedRating = String(currentRating); 139 | }