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
900 stars 32 forks source link

DataLoom unrecoverable crash: value.match is not a function error on frontmatter columns of type number #860

Closed abbourne closed 7 months ago

abbourne commented 7 months ago

Describe the bug

Whenever I try to set a frontmatter property on a column that has been set to a type of number, I get the following error as soon as I select the frontmatter property.

Opps DataLoom experienced an error Error message: value.match is not a function

Steps to reproduce

Expected behavior

  1. DataLoom not to crash in an unrecoverable way
  2. DataLoom to support frontmatter properties of type Number

Are you using the mobile app?

No

Obsidian debug info

Error message: value.match is not a function Error info: at NumberCell (plugin:notion-like-tables:52069:3) at div at div at eval (plugin:notion-like-tables:49533:5) at BodyCellContainer (plugin:notion-like-tables:53793:3) at div at BodyCell (plugin:notion-like-tables:51603:3) at div at BodyRow (plugin:notion-like-tables:51354:5) at TableRow (plugin:notion-like-tables:54281:27) at div at eval (plugin:notion-like-tables:54584:20) at VirtuosoItems2 (plugin:notion-like-tables:47560:21) at div at Table at div at Viewport (plugin:notion-like-tables:47634:19) at div at VirtuosoScroller (plugin:notion-like-tables:46762:21) at TableVirtuosoRoot (plugin:notion-like-tables:47662:27) at eval (plugin:notion-like-tables:43969:38) at Table3 (plugin:notion-like-tables:54234:3) at div at App10 (plugin:notion-like-tables:64693:18) at MenuProvider (plugin:notion-like-tables:47892:25) at DragProvider (plugin:notion-like-tables:51327:25) at LoomStateProvider (plugin:notion-like-tables:43462:17) at Provider (plugin:notion-like-tables:42913:10) at AppMountProvider (plugin:notion-like-tables:43397:3) at ErrorBoundary (plugin:notion-like-tables:64838:5) at LoomApp (plugin:notion-like-tables:64873:3)

Relevant log output

No [DataLoom] logs were found. This is what's in the console:

plugin:notion-like-tables:43077 Uncaught TypeError: value.match is not a function
    at isNumber (plugin:notion-like-tables:43077:16)
    at NumberCell (plugin:notion-like-tables:52076:7)
    at renderWithHooks (plugin:notion-like-tables:13636:26)
    at mountIndeterminateComponent (plugin:notion-like-tables:16365:21)
    at beginWork (plugin:notion-like-tables:17320:22)
    at HTMLUnknownElement.callCallback2 (plugin:notion-like-tables:5448:22)
    at Object.invokeGuardedCallbackDev (plugin:notion-like-tables:5473:24)
    at invokeGuardedCallback (plugin:notion-like-tables:5507:39)
    at beginWork$1 (plugin:notion-like-tables:21133:15)
    at performUnitOfWork (plugin:notion-like-tables:20569:20)
9plugin:notion-like-tables:15490 The above error occurred in the <NumberCell> component:

    at NumberCell (plugin:notion-like-tables:52069:3)
    at div
    at div
    at eval (plugin:notion-like-tables:49533:5)
    at BodyCellContainer (plugin:notion-like-tables:53793:3)
    at div
    at BodyCell (plugin:notion-like-tables:51603:3)
    at div
    at BodyRow (plugin:notion-like-tables:51354:5)
    at TableRow (plugin:notion-like-tables:54281:27)
    at div
    at eval (plugin:notion-like-tables:54584:20)
    at VirtuosoItems2 (plugin:notion-like-tables:47560:21)
    at div
    at Table
    at div
    at Viewport (plugin:notion-like-tables:47634:19)
    at div
    at VirtuosoScroller (plugin:notion-like-tables:46762:21)
    at TableVirtuosoRoot (plugin:notion-like-tables:47662:27)
    at eval (plugin:notion-like-tables:43969:38)
    at Table3 (plugin:notion-like-tables:54234:3)
    at div
    at App10 (plugin:notion-like-tables:64693:18)
    at MenuProvider (plugin:notion-like-tables:47892:25)
    at DragProvider (plugin:notion-like-tables:51327:25)
    at LoomStateProvider (plugin:notion-like-tables:43462:17)
    at Provider (plugin:notion-like-tables:42913:10)
    at AppMountProvider (plugin:notion-like-tables:43397:3)
    at ErrorBoundary (plugin:notion-like-tables:64838:5)
    at LoomApp (plugin:notion-like-tables:64873:3)

React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.
decaf-dev commented 7 months ago

Hi @abbourne. Thanks for posting this. I will push out a fix shortly.

decaf-dev commented 7 months ago

@abbourne Thanks for being patient with this. There was a quick fix but it didn't really solve some of the bigger issues. I have been spending some type updating some of the data types to be more compatible with the Obsidian frontmatter. Those updates will all be released in the next version.

abbourne commented 7 months ago

No problem at all. Thanks for keeping me updated. I like the way you’ve implemented your plug-in to provide notion-like database functionality - it’s very clean and easy to understand and use.

On Nov 20, 2023 at 8:47:15 PM, Trey Wallis @.***> wrote:

@abbourne https://github.com/abbourne Thanks for being patient with this. There was a quick fix but it didn't really solve some of the bigger issues. I have been spending some type updating some of the data types to be more compatible with the Obsidian frontmatter. Those updates will all be released in the next version.

— Reply to this email directly, view it on GitHub https://github.com/trey-wallis/obsidian-dataloom/issues/860#issuecomment-1820081946, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARWW5PW27SLQFMKPNR3ZE3YFQB2HAVCNFSM6AAAAAA7OOQ3X6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRQGA4DCOJUGY . You are receiving this because you were mentioned.Message ID: @.***>

decaf-dev commented 7 months ago

Fixed in 8.13.0