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

Fix js crash while trying to justify empty lines #3570

Merged
merged 2 commits into from
Nov 8, 2016

Conversation

CruelSilence
Copy link
Contributor

There is no need to justify empty lines.
If we have a text that contains multiple empty lines in the middle, JS crashes in justifyLine function.
The start glyph index is bigger than the end index in such a case.

There is no need to justify empty lines.
If we have a text that contains multiple empty lines in the middle, JS crashes in `justifyLine` function. 
The `start` glyph index is bigger than the `end` index in such a case.
@mourner
Copy link
Member

mourner commented Nov 8, 2016

Great! Could you also add a test for that?

@CruelSilence
Copy link
Contributor Author

No problem. Just did =)

Copy link
Member

@mourner mourner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! Merging on green.

@mourner mourner merged commit 1a9dd3e into mapbox:master Nov 8, 2016
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 this pull request may close these issues.

2 participants