Skip to content

Commit

Permalink
v1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
madox2 committed Oct 14, 2018
1 parent 1bb25a4 commit c81bc60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ var includeProps = exports.includeProps = function includeProps(target, props) {
* Computes appropriate font size of tag.
*/
var fontSizeConverter = exports.fontSizeConverter = function fontSizeConverter(count, min, max, minSize, maxSize) {
if (max - min === 0) {
// handle devision by zero
return Math.round((minSize + maxSize) / 2);
}
return Math.round((count - min) * (maxSize - minSize) / (max - min) + minSize);
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-tagcloud",
"version": "1.3.0",
"version": "1.3.1",
"description": "Tag/word cloud component for react",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit c81bc60

Please sign in to comment.