mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
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:
@@ -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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user