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

NullRef on Text Model once space-character is contained in string (Only when using node.js) #468

Open
Byteschmiede opened this issue Jul 27, 2020 · 1 comment
Labels

Comments

@Byteschmiede
Copy link

This happens when I try to build a Text Object with a String which contains a space character.

Like: "A B C"

new makerjs.models.Text(font, "A B C", 3)

The following error appears:

Trace: TypeError: Cannot read property '0' of undefined at Object.isPointEqual (/xxx/node_modules/makerjs/dist/index.js:3576:39)

Once I try to build a Text without the space character, it works fine.

@Byteschmiede
Copy link
Author

Byteschmiede commented Jul 27, 2020

I've fixed the Bug in maker.js

Index.js Line 9788

if (points[0] && !MakerJs.measure.isPointEqual(currPoint, points[0])) { addPath(new MakerJs.paths.Line(currPoint, points[0])); }

The check if points[0] aren't undefined works fine.

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

No branches or pull requests

2 participants