Browse Source

Remove implicit boolean conversion from homepage example (#1781)

We shouldn't be encouraging this pattern which requires good understanding of JS quirks and can lead to bugs in other instances.
main
Michal Srb 5 years ago
committed by GitHub
parent
commit
59ff52aa82
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/home/examples/an-application.js

2
content/home/examples/an-application.js

@ -34,7 +34,7 @@ class TodoApp extends React.Component {
handleSubmit(e) { handleSubmit(e) {
e.preventDefault(); e.preventDefault();
if (!this.state.text.length) { if (this.state.text.length === 0) {
return; return;
} }
const newItem = { const newItem = {

Loading…
Cancel
Save