Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lastValidCoord is undefined #149

Open
dispossible opened this issue Jul 21, 2017 · 4 comments · May be fixed by #192
Open

lastValidCoord is undefined #149

dispossible opened this issue Jul 21, 2017 · 4 comments · May be fixed by #192

Comments

@dispossible
Copy link

In Util.js at line 167 in the smoothenPath function, lastValidCoord is undefined. Which if running the script standalone wouldn't be an issue as js will add the variable to the window scope, however it causes my build to error when used with the webpack and babel preprocessors.

I believe the fix for this is that variable should to be defined on line 145 along with the other scoped variables.

@rejhgadellaa
Copy link

Just ran into the same problem when packaging Pathfinding using Rollup. The problem is that lastValidCoord is not 'strict-mode' safe.

@rejhgadellaa rejhgadellaa linked a pull request May 14, 2021 that will close this issue
@JanVeb
Copy link

JanVeb commented Dec 19, 2022

lastValidCoord is not defined

Whats up with this?
Reading here it seems this issue was fixed? But it is still happening to me when trying to smoothen the path?

var newPath = PF.Util.compressPath(path); works though, is there big difrence betwen compresed and smoothen path?

@rejhgadellaa
Copy link

The pull request is still open, so this repo doesn't contain the fix yet. I doubt it ever will 😢

You can use my fork where I did merge the fix into master:
https://github.com/rejhgadellaa/PathFinding.js/tree/master

@JanVeb
Copy link

JanVeb commented Dec 19, 2022

Thanks, will check it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants