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:
parent
6f2ab392ab
commit
f03315ad4d
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
You typically listen to Node.js events by using an emitter's `.on` function.
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
+ app.on('ready').then(() => {
|
+ app.on('ready', () => {
|
||||||
- app.whenReady().then(() => {
|
- app.whenReady().then(() => {
|
||||||
createWindow()
|
createWindow()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue