Browse Source

docs: Fix the syntax error for code fragment (#37962)

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 <[email protected]>
trop[bot] 2 years ago
parent
commit
578624896f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      docs/tutorial/tutorial-2-first-app.md

+ 1 - 1
docs/tutorial/tutorial-2-first-app.md

@@ -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()
 })