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

Handle empty strings #26

Merged
merged 2 commits into from
Nov 1, 2018
Merged

Handle empty strings #26

merged 2 commits into from
Nov 1, 2018

Conversation

flovouin
Copy link
Contributor

Hi,

I noticed that the templating system seems to be having issues with empty strings (and other values resulting in if (value) evaluating to false) as parameter values:

parse('{{foo}}')({ foo: '' }) returns null (in fact, the defaultValue) instead of ''

I added a test for this edge case, and fixed it.

Tell me what you think 🙂

Cheers,

Flo

Copy link
Member

@curran curran left a comment

Choose a reason for hiding this comment

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

A solid change! Thank you for this.

@curran curran merged commit 83414f1 into datavis-tech:master Nov 1, 2018
@curran
Copy link
Member

curran commented Nov 1, 2018

@flovouin
Copy link
Contributor Author

flovouin commented Nov 1, 2018

That was fast, thanks a lot!

@flovouin
Copy link
Contributor Author

flovouin commented Nov 4, 2018

I just realised I missed a semicolon at the end of this line. I'm not gonna open a new PR just for that, but next time you get around committing some changes... 😉

@curran
Copy link
Member

curran commented Nov 5, 2018

Fixed. Thanks! d9cd78e

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