Skip to content

Commit

Permalink
fix: update isTable judgement
Browse files Browse the repository at this point in the history
  • Loading branch information
huanhuanwa committed May 13, 2024
1 parent 6f8a55b commit da74bf5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/draw/src/interfaces/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { EngineExtraData } from './engine';
export interface PlaitTable extends PlaitElement {
id: string;
points: Point[];
type: 'table';
rows: {
id: string;
height?: number;
Expand Down Expand Up @@ -41,6 +42,6 @@ export interface PlaitTableCellParagraph extends ParagraphElement {

export const PlaitTableElement = {
isTable: (value: any): value is PlaitTable => {
return value.rows && value.columns && value.cells;
return value.type === 'table'
}
};

0 comments on commit da74bf5

Please sign in to comment.