Skip to content

Commit

Permalink
fix(database): edge-cases for drag to fill (#6942)
Browse files Browse the repository at this point in the history
  • Loading branch information
golok727 committed May 5, 2024
1 parent 98a299b commit 2b4e128
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export class DragToFillElement extends ShadowlessElement {
box-sizing: border-box;
background-color: var(--affine-background-primary-color);
border: 2px solid var(--affine-primary-color);
display: none;
position: absolute;
cursor: ns-resize;
width: 10px;
Expand Down Expand Up @@ -89,9 +90,9 @@ export function fillSelectionWithFocusCellData(
const curRowId = cellContainer.rowId;

if (tRichText.is(curCol.dataType)) {
const focusCellText = focusData as Text;
const focusCellText = focusData as Text | undefined;

const delta = focusCellText.toDelta();
const delta = focusCellText?.toDelta() ?? [{ insert: '' }];
const curCellText = curCol.getValue(curRowId) as Text | undefined;

if (curCellText) {
Expand Down

0 comments on commit 2b4e128

Please sign in to comment.