Skip to content

Fix misleading convertNumber() call#123

Open
ricordisamoa wants to merge 1 commit intowikimedia:masterfrom
ricordisamoa:convertNumber
Open

Fix misleading convertNumber() call#123
ricordisamoa wants to merge 1 commit intowikimedia:masterfrom
ricordisamoa:convertNumber

Conversation

@ricordisamoa
Copy link
Contributor

The second argument should be a boolean, and the result already goes through parseFloat()

The second argument should be a boolean, and the result already goes
through parseFloat()
*/
plural: function ( nodes ) {
var count = parseFloat( this.language.convertNumber( nodes[ 0 ], 10 ) ),
var count = this.language.convertNumber( nodes[ 0 ], true ),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you want to keep parseFloat() just in case convertNumber() is overridden by a misbehaving implementation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant