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

Numeric value causes TypeError #176

Open
gwhenne opened this issue Aug 16, 2018 · 1 comment · May be fixed by #177
Open

Numeric value causes TypeError #176

gwhenne opened this issue Aug 16, 2018 · 1 comment · May be fixed by #177

Comments

@gwhenne
Copy link

gwhenne commented Aug 16, 2018

I have a div like this:

<div data-i18n="10">10</div>

This results in Uncaught TypeError: messageKey.indexOf is not a function in this line in i18n:

lBracket = messageKey.indexOf( '[' );

Since messageKey is a number, not a string.

I suggest the following fix, a few lines up:

messageKey = $this.data( 'i18n' ) + '',

Thereby forcing messageKey to be a string.

@deepikap1
Copy link

@gwhenne, I would like to work on this issue.

@deepikap1 deepikap1 linked a pull request Aug 21, 2018 that will close this issue
Kirtishukla2004 added a commit to Kirtishukla2004/jquery.i18n that referenced this issue Mar 14, 2023
Kirtishukla2004 added a commit to Kirtishukla2004/jquery.i18n that referenced this issue Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants