diff --git a/_StoreMixin.js b/_StoreMixin.js index 1629e51ab..9ee4b1609 100644 --- a/_StoreMixin.js +++ b/_StoreMixin.js @@ -460,6 +460,12 @@ define([ rows.max--; } + // max should never be less than zero; if it is the logic in the 'add, update' handler + // below will prevent insertion of rows (https://github.com/SitePen/dgrid/issues/1305) + if (rows.max < 0) { + rows.max = 0; + } + row = rows[from]; // check to make the sure the node is still there before we try to remove it