Skip to content

Commit ac03836

Browse files
authored
Merge pull request #1888 from Violet-Bora-Lee/master
minor fixes
2 parents c2ce2d4 + b491097 commit ac03836

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

1-js/04-object-basics/07-optional-chaining/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[recent browser="new"]
55

6-
The optional chaining `?.` is an error-prone way to access nested object properties, even if an intermediate property doesn't exist.
6+
The optional chaining `?.` is an error-proof way to access nested object properties, even if an intermediate property doesn't exist.
77

88
## The problem
99

@@ -40,7 +40,7 @@ AND'ing the whole path to the property ensures that all components exist, but is
4040

4141
The optional chaining `?.` stops the evaluation and returns `undefined` if the part before `?.` is `undefined` or `null`.
4242

43-
Further in this article, for brewity, we'll be saying that something "exists" if it's not `null` and not `undefined`.
43+
Further in this article, for brevity, we'll be saying that something "exists" if it's not `null` and not `undefined`.
4444

4545

4646
Here's the safe way to access `user.address.street`:

2-ui/2-events/05-dispatch-events/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ The output order is: 1 -> nested -> 2.
243243

244244
Please note that the nested event `menu-open` is caught on the `document`. The propagation and handling of the nested event is finished before the processing gets back to the outer code (`onclick`).
245245

246-
That's not only about `dispatchEvent`, there are other cases. If an event handler calls methods that trigger to other events -- they are too processed synchronously, in a nested fasion.
246+
That's not only about `dispatchEvent`, there are other cases. If an event handler calls methods that trigger to other events -- they are too processed synchronously, in a nested fashion.
247247

248-
Let's say we don't like it. We'd want `onclick` to be fully processed first, independantly from `menu-open` or any other nested events.
248+
Let's say we don't like it. We'd want `onclick` to be fully processed first, independently from `menu-open` or any other nested events.
249249

250250
Then we can either put the `dispatchEvent` (or another event-triggering call) at the end of `onclick` or, maybe better, wrap it in the zero-delay `setTimeout`:
251251

0 commit comments

Comments
 (0)