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

The method mounted on global in the ES Modules environment throws an error

Open WoJiaoFuXiaoYun opened this issue 11 months ago • 0 comments

When I import litegraph.js in vite and encounter an error, I traced the code and found that the methods are mounted through global, while in the vite development environment, they are loaded using EMS.I think it should be this problem.

litegraph.js:16882  Uncaught ReferenceError: clamp is not defined
    at WidgetNumber.onMouseUp (litegraph.js:16882:12)
    at LGraphCanvas.processMouseUp (litegraph.js:6910:26)

WoJiaoFuXiaoYun avatar Apr 01 '24 09:04 WoJiaoFuXiaoYun