generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 67
Closed
Labels
bugUndesired behavior caused by this pluginUndesired behavior caused by this plugin
Description
this is not really a bug and more of a documentation / discussion.
Describe the Issue
all undefined variables will be initialized with the empty string when filling context
of a JS-view field.
obsidian-meta-bind-plugin/packages/core/src/fields/viewFields/JsViewFieldMountable.ts
Line 61 in 7cab274
context[variable.contextName] = variable.metadataSignal.get() ?? ''; |
Steps to Reproduce
The following JS-view doesn't behave as expected. instead of returning empty
for undefined properties, it will return the empty string.
~~~meta-bind-js-view
{fuzz} as var
---
return context.bound.var ?? "empty"
~~~
Further context
Not sure how this behavior guards against other issues I cant think of right now. In that case it should be better documented to avoid confusion.
Metadata
Metadata
Assignees
Labels
bugUndesired behavior caused by this pluginUndesired behavior caused by this plugin