Skip to content

Commit 30cea9f

Browse files
committed
fix: hide plugin error unless debug is on
1 parent 680ad3f commit 30cea9f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { PluginQueueItem } from '@vue/devtools-api'
22
import { Plugin, BackendContext, DevtoolsPluginApiInstance } from '@vue-devtools/app-backend-api'
3-
import { BridgeEvents, target } from '@vue-devtools/shared-utils'
3+
import { BridgeEvents, SharedData, target } from '@vue-devtools/shared-utils'
44
import { getAppRecord, getAppRecordId } from './app'
55

66
export async function addPlugin (pluginQueueItem: PluginQueueItem, ctx: BackendContext) {
@@ -22,7 +22,9 @@ export async function addPlugin (pluginQueueItem: PluginQueueItem, ctx: BackendC
2222
}
2323
} catch (e) {
2424
plugin.error = e
25-
console.error(e)
25+
if (SharedData.debugInfo) {
26+
console.error(e)
27+
}
2628
}
2729
ctx.currentPlugin = null
2830
ctx.plugins.push(plugin)

0 commit comments

Comments
 (0)