Skip to content

Commit 39a9254

Browse files
committed
replace parseFloat() by parseInt(x, 10) - Thanks @grilix
1 parent cd25c39 commit 39a9254

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/jquery.counter.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@
6767
return this.each(function() {
6868
var e = $(this);
6969
var data = e.data('counter') || {};
70-
//WARN: Don't use parseInt => parseInt('09') == 0
71-
data.interval = parseFloat(options.interval || e.attr('data-interval') || '1000');
70+
data.interval = parseInt(options.interval || e.attr('data-interval') || '1000', 10);
7271
data.down = ( options.direction || e.attr('data-direction') || 'down') == 'down';
7372
data.parts = [];
7473
var initial = (options.initial || e.text()).split(/([^0-9]+)/);

0 commit comments

Comments
 (0)