litegraph.js icon indicating copy to clipboard operation
litegraph.js copied to clipboard

Cant find variable def_options

Open shortthefomo opened this issue 2 years ago • 3 comments

ISSUE

From 0.7.11 on wards (0.7.10 it still works) if one clicks on the menu properties to edit one of the items it throws a "Cant find variable def_options" in the console.

At the moment having to use an older build 0.7.10 that does not have this issue and opens the property editor from a menu item of a node.

I found this pull request https://github.com/jagenjo/litegraph.js/pull/348 and then tried using the git repo and master "litegraph.js": "jagenjo/litegraph.js#master", in my local build but it was still throwing this issue.

Screen Shot 2023-04-05 at 08 53 55

To reproduce simply create the boiler plate example as defined in the readme of this project.

  1. right click any node
  2. try edit any property of that node

shortthefomo avatar Apr 05 '23 13:04 shortthefomo

It looks like there are multiple cases when variables are defined without let, var or const. In webpacked environment or if "use strict" was used, errors are produced.

fsmorygo avatar Apr 07 '23 14:04 fsmorygo

you are correct!

my environment is using vite and vue3 on the front end, where these issues are exposed.

shortthefomo avatar Apr 07 '23 15:04 shortthefomo

please, if you spot them add PRs with the fix

jagenjo avatar Apr 07 '23 17:04 jagenjo