Skip to content

[regression] Dynamically generating tables with mb.createBindTarget doesn't work anymore #285

@seomwan

Description

@seomwan

Please fill out these Check-boxes

  • I checked that the plugin is up to date
  • The issue persist with all other plugins and themes disabled

This Issue Occurs on

  • Windows
  • Linux
  • macOS
  • Android
  • iOS

Plugin Version

1.0.3

Describe the Issue

Here's the example I used as reference:

const bindTarget = mb.createBindTarget('activities', context.file.path);

Gives the error:

plugin:js-engine:45 failed to execute JS Error: [MB_INTERNAL] "invalid arguments supplied to function" caused by error "[
  {
    "code": "invalid_type",
    "expected": "array",
    "received": "undefined",
    "path": [
      "property"
    ],
    "message": "Required"
  }
]"
    at jr (plugin:obsidian-meta-bind-plugin:110:56155)
    at Ah.createBindTarget (plugin:obsidian-meta-bind-plugin:111:17437)
    at Bo.eval [as func] (eval at buildFunction (plugin:js-engine:1:1), <anonymous>:7:23)
    at Bo.runFunction (plugin:js-engine:45:61422)
[...]

Steps to Reproduce

Reproducible in a new test vault with Metabind and JSengine installed:

```js-engine
const mb = engine.getPlugin('obsidian-meta-bind-plugin').api;

const bindTarget = mb.createBindTarget('activities', context.file.path);
```

Expected Behavior

Shouldn't error as it worked in previous (<1.0) versions.

Or example needs to be updated for new behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behavior caused by this plugin

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions