diff --git a/api/js/egw_action/egw_action_dragdrop.js b/api/js/egw_action/egw_action_dragdrop.js index 7b45a582da..3c930e552e 100644 --- a/api/js/egw_action/egw_action_dragdrop.js +++ b/api/js/egw_action/egw_action_dragdrop.js @@ -104,8 +104,9 @@ function egwDragActionImplementation() // Take select all into account when counting number of rows, because they may not be // in _selected object - var pseudoNumRows = (_selected[0] && _selected[0]._context._selectionMgr._selectAll) ? - _selected[0]._context._selectionMgr._total : _selected.length; + var pseudoNumRows = (_selected[0] && _selected[0]._context && _selected[0]._context._selectionMgr && + _selected[0]._context._selectionMgr._selectAll) ? + _selected[0]._context._selectionMgr._total : _selected.length; for (var i = 0; i < _selected.length;i++) {