Skip to content

Commit 98eecee

Browse files
committed
fix(plugin): current plugin on context
1 parent bfbf1ce commit 98eecee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/app-backend-core/src/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ export function addPlugin (pluginDescriptor: PluginDescriptor, setupFn: SetupFun
88
setupFn,
99
error: null
1010
}
11+
ctx.currentPlugin = plugin
1112
try {
12-
ctx.currentPlugin = plugin
1313
setupFn(ctx.api)
14-
ctx.currentPlugin = null
1514
} catch (e) {
1615
plugin.error = e
1716
}
17+
ctx.currentPlugin = null
1818
ctx.plugins.push(plugin)
1919
ctx.bridge.send(BridgeEvents.TO_FRONT_DEVTOOLS_PLUGIN_ADD, {
2020
plugin: serializePlugin(plugin)

0 commit comments

Comments
 (0)