Merge pull request #2219 from vsemozhetbyt/patch-9

Fix typo in 1.4.7 (optional chaining)
This commit is contained in:
Ilya Kantor 2020-10-22 23:43:07 +03:00 committed by GitHub
commit bd0fbbe24d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,7 @@ let user = {}; // user has no address
alert(user.address ? user.address.street ? user.address.street.name : null : null);
```
That's just awful, one may even problems understanding such code.
That's just awful, one may even have problems understanding such code.
Don't even care to, as there's a better way to write it, using the `&&` operator: