Skip to content

Commit

Permalink
CB-4065 safe context getter (#2043)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexey <[email protected]>
Co-authored-by: Daria Marutkina <[email protected]>
  • Loading branch information
3 people authored Oct 9, 2023
1 parent 37d76c4 commit 48b9326
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function useTableColumnDnD(model: IDatabaseDataModel, resultIndex: number
let side: TableColumnInsertPositionSide = null;

if (columnKey && dndBox.state.isOver && dndBox.state.context) {
const dndColumnKey = dndBox.state.context.get(DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY);
const dndColumnKey = dndBox.state.context.tryGet(DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY);

if (resultSetViewAction && dndColumnKey && resultSetViewAction.columnIndex(columnKey) > resultSetViewAction.columnIndex(dndColumnKey)) {
side = 'right';
Expand Down

0 comments on commit 48b9326

Please sign in to comment.