From a22635bd9f664be51083947781844ce066ff5599 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Wed, 17 May 2023 10:32:59 -0700 Subject: [PATCH] docs: update example to use app.whenReady() (#38337) * docs: update example to use app.whenReady() * docs: retain async --- docs/api/session.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/session.md b/docs/api/session.md index ffa9be00f317..e6248afd3736 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -1390,7 +1390,7 @@ extension to be loaded. const { app, session } = require('electron') const path = require('path') -app.on('ready', async () => { +app.whenReady().then(async () => { await session.defaultSession.loadExtension( path.join(__dirname, 'react-devtools'), // allowFileAccess is required to load the devtools extension on file:// URLs.