Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes #1: prevent errors when attempting to remove rows from an empty…

… table.
  • Loading branch information...
commit d5e1f84b8471388abbdabf65b67b87f750d6070d 1 parent b79810e
@reednj authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 Source/jsTable.js
View
4 Source/jsTable.js
@@ -133,6 +133,10 @@ var jsTable = new Class({
},
deleteRow: function(row_index) {
+ if(row_index < 0 || row_index > this.data.length - 1) {
+ return;
+ }
+
var row_data = this.data[row_index];
var row_id = this.row_list[row_index];
var tr_id = this._getRowElementId(row_id);
Please sign in to comment.
Something went wrong with that request. Please try again.