decaf-dev / obsidian-dataloom

Weave together data from diverse sources and display them in different views. Inspired by Excel spreadsheets and Notion.so.
https://dataloom.xyz/
MIT License
914 stars 33 forks source link

Not matching a MultiTag column on import crashes viewer #892

Open fadialzammar opened 10 months ago

fadialzammar commented 10 months ago

Describe the bug

When data is imported into a DataLoom but not all columns are matched, the .loom always fills in "content": "" for the cells of columns that did not have a matched column, regardless of the data type meant to be stored in that cell. For MultiTag columns specifically, because cells are instead expected to have an array "tagIds": [], doing this type of import causes the viewer to crash. If the cell is not visable right away, the crash will happen when you scroll down to the affected cell.

image

Side note: There's a typo in "Oops"

Steps to reproduce

Expected behavior

A row to be added with an empty cell in the unmatched column

Are you using the mobile app?

No

Obsidian debug info

SYSTEM INFO: Obsidian version: v1.4.16 Installer version: v1.4.16 Operating system: Windows 10 Education 10.0.22621 Login status: not logged in Insider build toggle: off Live preview: on Legacy editor: off Base theme: dark Community theme: none Snippets enabled: 0 Restricted mode: off Plugins installed: 4 Plugins enabled: 4 1: Advanced Tables v0.18.1 2: LanguageTool Integration v0.3.3 3: Obsidian Git v2.22.0 4: DataLoom v8.15.5

RECOMMENDATIONS: Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Relevant log output

From the "Copy to clipboard" button on the screenshot shown above:

Error message: Cannot read properties of undefined (reading 'includes')
Error info: 
    at BodyCellContainer (plugin:notion-like-tables:57916:9)
    at div
    at BodyCell (plugin:notion-like-tables:55753:3)
    at div
    at BodyRow (plugin:notion-like-tables:55504:5)
    at TableRow (plugin:notion-like-tables:58533:27)
    at div
    at eval (plugin:notion-like-tables:58975:20)
    at VirtuosoItems2 (plugin:notion-like-tables:51454:21)
    at div
    at Table
    at div
    at Viewport (plugin:notion-like-tables:51528:19)
    at div
    at VirtuosoScroller (plugin:notion-like-tables:50656:21)
    at TableVirtuosoRoot (plugin:notion-like-tables:51556:27)
    at eval (plugin:notion-like-tables:47863:38)
    at Table3 (plugin:notion-like-tables:58488:3)
    at div
    at App10 (plugin:notion-like-tables:68707:18)
    at MenuProvider (plugin:notion-like-tables:51786:25)
    at DragProvider (plugin:notion-like-tables:55477:25)
    at LoomStateProvider (plugin:notion-like-tables:47356:17)
    at Provider (plugin:notion-like-tables:46825:10)
    at AppMountProvider (plugin:notion-like-tables:47292:3)
    at ErrorBoundary (plugin:notion-like-tables:68853:5)
    at LoomApp (plugin:notion-like-tables:68888:3)