Skip to content

Right click context menu items missing. #308

Closed
@edzillion

Description

@edzillion

Steps to Reproduce:

  1. Create empty vault.
  2. Install & Enable obsidian map view
  3. Create new note
  4. Right click on this note

Console error:

app.js:1 Uncaught TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
    at MapViewPlugin.onEditorMenu (VM146 plugin:obsidian-map-view:60994:42)
    at eval (VM146 plugin:obsidian-map-view:60790:22)
    at t.tryTrigger (app.js:1:741961)
    at t.trigger (app.js:1:741894)
    at t.trigger (app.js:1:2256223)
    at t.<anonymous> (app.js:1:1674472)
    at app.js:1:239667
    at Object.next (app.js:1:239772)
    at a (app.js:1:238490)

I have fixed this already,

main.ts:859:

                const [location, name] = this.getLocationOnEditorLine(
                    editor,
                    editorLine,
                    view,
                    true,
                ) ?? [];

Just added nullish coalescer in case getLocationOnEditorLine() returns null.

I will make submit a PR with this fix now FWW.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions