camelCase prop values invalid?
Was fooling around with datacorejsx (as a user, not a dev) and found that snake_case date property values were handled fine, but camelCase came up undefined in the console.
I noticed too that I could only access my properties when querying them in small case, even though they were in camelCase in the actual note.
Then I realized that was because I was accessing them like this: note.$frontmatter?.key?.value, instead of the expected syntax: note.value("key"). It is case-insensitive, you can do either note.value("tagName") or note.value("tagname").
the expected syntax:
note.value("key")
Yes, both page.value("key") and note.value("key") work.
The only place replacing these didn't work was where I had functions that handle dynamic property access. So I wasn't able to change these without breaking functionality:
- any instance of
$frontmatter?.[property] - any instance of
$frontmatter?.['property']