Skip to content

Commit

Permalink
docs: Fix the syntax error for code fragment (#37960)
Browse files Browse the repository at this point in the history
By using `app.on('ready').then(xxx)`, application will throw a TypeError

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Zenkie Bear <62818957+ZenkieBear@users.noreply.github.com>
  • Loading branch information
trop[bot] and ZenkieBear committed Apr 13, 2023
1 parent 3a027a7 commit f9faad7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/tutorial/tutorial-2-first-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ calling `createWindow()` once its promise is fulfilled.
You typically listen to Node.js events by using an emitter's `.on` function.

```diff
+ app.on('ready').then(() => {
+ app.on('ready', () => {
- app.whenReady().then(() => {
createWindow()
})
Expand Down

0 comments on commit f9faad7

Please sign in to comment.