Skip to content

Commit

Permalink
fix: hide plugin error unless debug is on
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Oct 3, 2022
1 parent 680ad3f commit 30cea9f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/app-backend-core/src/plugin.ts
@@ -1,6 +1,6 @@
import { PluginQueueItem } from '@vue/devtools-api'
import { Plugin, BackendContext, DevtoolsPluginApiInstance } from '@vue-devtools/app-backend-api'
import { BridgeEvents, target } from '@vue-devtools/shared-utils'
import { BridgeEvents, SharedData, target } from '@vue-devtools/shared-utils'
import { getAppRecord, getAppRecordId } from './app'

export async function addPlugin (pluginQueueItem: PluginQueueItem, ctx: BackendContext) {
Expand All @@ -22,7 +22,9 @@ export async function addPlugin (pluginQueueItem: PluginQueueItem, ctx: BackendC
}
} catch (e) {
plugin.error = e
console.error(e)
if (SharedData.debugInfo) {
console.error(e)
}
}
ctx.currentPlugin = null
ctx.plugins.push(plugin)
Expand Down

0 comments on commit 30cea9f

Please sign in to comment.