microsoft / microsoft/maker.js
NullRef on Text Model once space-character is contained in string (Only when using node.js)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 302
- Avg merge
- 21h 28m
- Merged PRs (30d)
- 5
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with new makerjs.models.Text(font, "A B C", 3) in Node.js and inspect node_modules/makerjs/dist/index.js around Object.isPointEqual. Compare it with a string without spaces; done means text containing spaces builds without the reported TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100