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

Fallback does not work with string '0' #38

Open
awjreynolds opened this issue Nov 9, 2016 · 1 comment
Open

Fallback does not work with string '0' #38

awjreynolds opened this issue Nov 9, 2016 · 1 comment

Comments

@awjreynolds
Copy link

I've had to put this check in place to handle strings that are 0 and enable fallback to work successfully.

return label === '0' ? counterpart(table.columns.${label}, { fallback: label }) : label;

@martinandert
Copy link
Owner

Hi @awjreynolds,

I'm afraid I can't reproduce your issue. Adding a test like this

assert.equal('bar', counterpart('foo.0', { fallback: 'bar' }));

does work for me.

Please send me a bit more code, preferably as a failing spec.

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

No branches or pull requests

2 participants