Skip to content

Commit c81bc60

Browse files
committed
v1.3.1
1 parent 1bb25a4 commit c81bc60

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/helpers.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ var includeProps = exports.includeProps = function includeProps(target, props) {
3131
* Computes appropriate font size of tag.
3232
*/
3333
var fontSizeConverter = exports.fontSizeConverter = function fontSizeConverter(count, min, max, minSize, maxSize) {
34+
if (max - min === 0) {
35+
// handle devision by zero
36+
return Math.round((minSize + maxSize) / 2);
37+
}
3438
return Math.round((count - min) * (maxSize - minSize) / (max - min) + minSize);
3539
};
3640

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-tagcloud",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Tag/word cloud component for react",
55
"main": "lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)