Merge pull request #2219 from vsemozhetbyt/patch-9
Fix typo in 1.4.7 (optional chaining)
This commit is contained in:
commit
bd0fbbe24d
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue