Skip to content

Commit

Permalink
Fix #207: improve simple-structure check in ColumnReorder extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth G. Franqueiro committed Jun 20, 2012
1 parent a170ee8 commit d4855f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extensions/ColumnReorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ define([
dndParent;

// enable column reordering for simple single-row structures only
if(this.subRows.length == 1 && !this.columnSets){
if(this.subRows && this.subRows.length == 1 && !this.columnSets){
arrayUtil.forEach(this.subRows[0], function(col){
if(col.reorderable === false){ return; }

Expand All @@ -74,6 +74,8 @@ define([
}else{
delete this.columnDndSource; // remove any previous leftovers
}
}else{
console.warn("The dgrid ColumnReorder extension only supports simple single-row structures.");
}
}
});
Expand Down

0 comments on commit d4855f8

Please sign in to comment.