Skip to content

Cannot read properties of undefined (reading 'xr') #45

@AlexW00

Description

@AlexW00

Describe the bug
Error when providing a nested HTML element as domNode:

plugin:obsidian-3d-graph:53529 Uncaught TypeError: Cannot read properties of undefined (reading 'xr')
    at HTMLElement.value (plugin:obsidian-3d-graph:53529:31)
    at HTMLElement.wrappedMethod (plugin:obsidian-3d-graph:52596:36)
    at gt (plugin:obsidian-3d-graph:2035:248)
    at st (plugin:obsidian-3d-graph:1988:15)
    at eval (plugin:obsidian-3d-graph:1996:37)
    at n2 (plugin:obsidian-3d-graph:2113:59)
    at MutationObserver.eval (plugin:obsidian-3d-graph:2118:82)

To Reproduce
Steps to reproduce the behavior:

  1. const nestedHtmlElement = document.querySelector(#some-nested-object)
  2. this.instance = ForceGraphVR()(nestedHtmlElement).graphData(data);

Expected behavior
It should work like the example code projects. But when providing an element other than body > div, it doesn't work.

Desktop (please complete the following information):

  • OS: macOS
  • Browser electron
  • Version latest

Additional context
Add any other context about the problem here.

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