Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with current Obsidian #8

Open
matthewturk opened this issue Aug 7, 2024 · 0 comments
Open

Issues with current Obsidian #8

matthewturk opened this issue Aug 7, 2024 · 0 comments

Comments

@matthewturk
Copy link
Owner

I am getting this traceback when I activate the view:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getRoot')
    at t.revealLeaf (app.js:1:2273618)
    at _t.activateView (plugin:contextual-sidecar:2:1428)
    at Object.callback (plugin:contextual-sidecar:2:1048)
    at RK (app.js:1:2040412)
    at t.onChooseItem (app.js:1:2630332)
    at t.onChooseSuggestion (app.js:1:1584862)
    at t.selectSuggestion (app.js:1:1584412)
    at e.useSelectedItem (app.js:1:1582271)
    at Object.func (app.js:1:1579670)
    at e.handleKey (app.js:1:754609)
    at e.onKeyEvent (app.js:1:755865)

This is the content of that function:

  async activateView() {
    if (
      this.app.workspace.getLeavesOfType(VIEW_TYPE_CONTEXTUAL_SIDECAR).length >
      0
    ) {
      await this.app.workspace.getRightLeaf(false).setViewState({
        type: VIEW_TYPE_CONTEXTUAL_SIDECAR,
        active: true,
      });
    }

    this.app.workspace.revealLeaf(
      this.app.workspace.getLeavesOfType(VIEW_TYPE_CONTEXTUAL_SIDECAR)[0]
    );
  }

My guess is that I am using an outdated idiom, and this needs to be fixed. I'll get on it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant