generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 71
Closed
Labels
bugUndesired behavior caused by this pluginUndesired behavior caused by this plugin
Description
Please fill out these Check-boxes
- I checked for existing similar issues
- I checked that the plugin is up to date
- The issue persists with all other plugins and themes disabled
Plugin Version
1.2.2
This Issue Occurs on
- Windows
- Linux
- macOS
- Android
- iOS
Debug Info
SYSTEM INFO:
Obsidian version: v1.7.4
Installer version: v1.6.7
Operating system: #1 SMP PREEMPT_DYNAMIC Sat Aug 3 09:55:34 UTC 2024 6.9.12-203.fsync.fc40.x86_64
Login status: logged in
Language: en
Catalyst license: supporter
Insider build toggle: on
Live preview: off
Base theme: dark
Community theme: halcyon v0.0.3
Snippets enabled: 8
Restricted mode: off
Plugins installed: 13
Plugins enabled: 13
1: Discord Rich Presence v1.5.1
2: Dynamic Table of Contents (manual install - deprecated) v0.0.27
3: Latex Suite v1.9.5
4: Sortable v0.3.1
5: Style Settings v1.0.9
6: Tag Wrangler v0.6.1
7: Templater v2.8.1
8: Meta Bind v1.2.2
9: Linter v1.26.0
10: JS Engine v0.1.17
11: TikZJax v0.5.2
12: Base Tag Renderer v1.2.1
13: Periodic Notes v0.0.17
RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
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.
Describe the Issue
When you have a list in YAML, and you create a button that should append to the list only once by using spreading notation [... new Set(x.concat(["element"]))], Meta Bind complains with a "YAML Parse Error", whereas this is valid JavaScript, and runs in the console.
Steps to Reproduce
- Make a note with a list in properties, for instance
my_list: []. - Create a button with the
updateMetadataaction, bound to that property. Setevaluateto true. - Set the value to precisely
[... new Set(x.concat(["element"]))] - Notice how MB throws the YAML Parse Error
Expected Behavior
If MB mentions that the value is interpreted as JavaScript, I expect this to work as it does in the console (e.g. the value "element" is added to the property once and only once). If there's a good reason why it shouldn't work, please update the docs.
Metadata
Metadata
Assignees
Labels
bugUndesired behavior caused by this pluginUndesired behavior caused by this plugin