Browse Source

fix: should be able to create empty whiteboard block

Peng Xiao 3 years ago
parent
commit
fefab647fd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tldraw/apps/tldraw-logseq/src/lib/shapes/LogseqPortalShape.tsx

+ 1 - 1
tldraw/apps/tldraw-logseq/src/lib/shapes/LogseqPortalShape.tsx

@@ -686,7 +686,7 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
       }
       }
     }, [handlers?.queryBlockByUUID, pageId])
     }, [handlers?.queryBlockByUUID, pageId])
 
 
-    const targetNotFound = this.props.blockType === 'B' && !blockContent
+    const targetNotFound = this.props.blockType === 'B' && typeof blockContent !== 'string'
     const showingPortal = (!this.props.collapsed || isEditing) && !targetNotFound
     const showingPortal = (!this.props.collapsed || isEditing) && !targetNotFound
 
 
     if (!renderers?.Page) {
     if (!renderers?.Page) {