From c5461d5f427c4566568e19a7ecb997a6a776d4c0 Mon Sep 17 00:00:00 2001 From: Mangala SSS Khalsa Date: Thu, 18 Jun 2020 21:58:10 -0700 Subject: [PATCH] Editor: fix removeRow bug When OnDemandList is pruning rows it sometimes calls 'removeRow' on a preload node. Editor's 'removeRow' logic assumes that the node will always be a valid row node which causes an error when it is not. This commit adds a guard in `Editor#removeRow` to ensure that a dgrid row object for the node exists. --- editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor.js b/editor.js index 6f43272e0..b7ed24730 100644 --- a/editor.js +++ b/editor.js @@ -611,7 +611,7 @@ return function(column, editor, editOn){ listeners.push(aspect.before(grid, 'removeRow', function (row) { var focusedCell = grid._focusedEditorCell; row = grid.row(row); - if (focusedCell && focusedCell.row.id === row.id) { + if (focusedCell && row && focusedCell.row.id === row.id) { previouslyFocusedCell = focusedCell; // Pause the focusout handler until after this row has had