cvdlab / react-planner

:pencil2: A React Component for plans design. Draw a 2D floorplan and navigate it in 3D mode.
https://cvdlab.github.io/react-planner
MIT License
1.28k stars 456 forks source link

Unhandled Rejection (TypeError): url.lastIndexOf is not a function, when the object uses LoadObjWithMaterial in load-obj.js #246

Closed AsifDaum closed 1 year ago

AsifDaum commented 1 year ago

Hi, how did anyone here manage to resolve this issue? The planner works fine on its own, but the moment when I use it as a package in a react app along with storing the catalog in the main app I am facing the above mentioned issue.

I have written a more detailed description on stackoverflow:

https://stackoverflow.com/questions/73834362/unhandled-rejection-typeerror-url-lastindexof-is-not-a-function-in-react-plan

Is anyone else facing this issue? How did you resolve this?

Thanks!

AsifDaum commented 1 year ago

Ok I have gotten the answer, I have written it in stack overflow, basically:

For some reason react app provides it with an object that contains the URL rather than the direct URL, thus you will have to point at the url individually.

For example: uri.default