Skip to content

Commit d947175

Browse files
reptvieron
authored andcommitted
fix(gridster): wrong addition solved in add_faux_rows/cols by adding parseInt
Closes ducksboard#426, ducksboard#425
1 parent d3f25f3 commit d947175

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jquery.gridster.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2963,7 +2963,7 @@
29632963
*/
29642964
fn.add_faux_rows = function(rows) {
29652965
var actual_rows = this.rows;
2966-
var max_rows = actual_rows + (rows || 1);
2966+
var max_rows = actual_rows + parseInt(rows || 1, 10);
29672967

29682968
for (var r = max_rows; r > actual_rows; r--) {
29692969
for (var c = this.cols; c >= 1; c--) {
@@ -2989,7 +2989,7 @@
29892989
*/
29902990
fn.add_faux_cols = function(cols) {
29912991
var actual_cols = this.cols;
2992-
var max_cols = actual_cols + (cols || 1);
2992+
var max_cols = actual_cols + parseInt(cols || 1, 10);
29932993
max_cols = Math.min(max_cols, this.options.max_cols);
29942994

29952995
for (var c = actual_cols + 1; c <= max_cols; c++) {

0 commit comments

Comments
 (0)