Skip to content

Commit

Permalink
Update text-field.jsx
Browse files Browse the repository at this point in the history
The isValid function return not correct, this caused re-rendering the whole TextField when value prop received.
  • Loading branch information
quangbuule committed Nov 6, 2015
1 parent 47bf496 commit dfa9216
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/text-field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ContextPure = require('./mixins/context-pure');
* @returns True if the string provided is valid, false otherwise.
*/
function isValid(value) {
return value || value === 0;
return Boolean(value || value === 0);
}

const TextField = React.createClass({
Expand Down

0 comments on commit dfa9216

Please sign in to comment.