fix(plugins/developer-settings): chain then on promise instead (again)
This commit is contained in:
parent
44a1496452
commit
240ff9d2cb
1 changed files with 6 additions and 7 deletions
|
|
@ -34,7 +34,7 @@ registerPlugin<Storage>(
|
|||
load: true,
|
||||
default: defaultStorage,
|
||||
},
|
||||
async start(api_) {
|
||||
start(api_) {
|
||||
api = api_
|
||||
|
||||
if (isSettingsModulesLoaded()) require('./utils').register()
|
||||
|
|
@ -45,12 +45,11 @@ registerPlugin<Storage>(
|
|||
|
||||
api_.cleanup(resetSettingsScreen)
|
||||
|
||||
const [rdt, settings] = await Promise.all([
|
||||
import('./react-devtools'),
|
||||
api.storage.get(),
|
||||
])
|
||||
|
||||
if (settings.devtools.autoConnect) rdt.connectToDevTools()
|
||||
Promise.all([import('./react-devtools'), api.storage.get()]).then(
|
||||
([rdt, settings]) => {
|
||||
if (settings.devtools.autoConnect) rdt.connectToDevTools()
|
||||
},
|
||||
)
|
||||
},
|
||||
},
|
||||
PluginFlags.Enabled,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue