Skip to content

Commit

Permalink
Fixes #32 - error when triple-clicking to select and then selecting d…
Browse files Browse the repository at this point in the history
…ifferent cell
  • Loading branch information
jstclair committed Feb 25, 2015
1 parent 80db915 commit e40ee75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ Selection.prototype.endEditingCell = function(cell) {
};

Selection.prototype.getRowByIndex = function(index, originTable) {
if (isNaN(index)) return null;

var targetTable = originTable || this.table;

// Check if we're moving out of table
Expand Down Expand Up @@ -380,7 +382,7 @@ function cellIsSelectable(cell) {
}

function cellIsEditable(cell) {
return cell._cellReadOnly() !== true;
return cell && typeof cell._cellReadOnly === 'function' && cell._cellReadOnly() !== true;
}

function cellIsVisible(cell) {
Expand Down

0 comments on commit e40ee75

Please sign in to comment.