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

By using `app.on('ready').then(xxx)`, application will throw a TypeError
This commit is contained in:
Zenkie Bear 2023-04-13 16:00:27 +08:00 committed by GitHub
parent 6f2ab392ab
commit f03315ad4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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