Skip to content

Commit a6a0285

Browse files
VilsafurMarshallOfSound
authored andcommitted
docs: Use Promise for dialog.showMessageBox (electron#21143)
* Update updates.md Use of the return promise for the use of `dialog.showMessageBox`. * Update updates.md
1 parent b3d44db commit a6a0285

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/tutorial/updates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
123123
detail: 'A new version has been downloaded. Restart the application to apply the updates.'
124124
}
125125

126-
dialog.showMessageBox(dialogOpts, (response) => {
127-
if (response === 0) autoUpdater.quitAndInstall()
126+
dialog.showMessageBox(dialogOpts).then((returnValue) => {
127+
if (returnValue.response === 0) autoUpdater.quitAndInstall()
128128
})
129129
})
130130
```

0 commit comments

Comments
 (0)