File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,9 @@ async function activeAllMcpServers() {
2929 snackbarStore .showSuccessMessage (' mcp.updated' )
3030 }
3131 } catch (error ) {
32- if (error instanceof Error ) {
33- console .log (error .message )
34- snackbarStore .showErrorMessage (error .message )
35- } else {
36- console .log (' Unknown Error' , error )
37- snackbarStore .showErrorMessage (' Unknown error, use devtool to check detailed console log' )
38- }
32+ const errorMsg = error instanceof Error ? error .message : String (error )
33+ console .log (errorMsg )
34+ snackbarStore .showErrorMessage (errorMsg )
3935 } finally {
4036 layoutStore .mcpLoading = false
4137 mcpStore .version ++
Original file line number Diff line number Diff line change @@ -152,12 +152,11 @@ class Mcp {
152152 }
153153
154154 const userConfigObj = mcpMetadata . config . user_config
155- if ( ! userConfigObj ) {
155+ const userConfig = dxtStore . getConfig ( key )
156+ if ( ! userConfigObj || ! userConfig ) {
156157 return [ key , mcpMetadata ]
157158 }
158159
159- const userConfig = dxtStore . getConfig ( key )
160-
161160 const mergedConfig = Object . fromEntries (
162161 Object . entries ( userConfigObj ) . map ( ( [ configKey , configVal ] ) => {
163162 const userValue = userConfig [ configKey ]
You can’t perform that action at this time.
0 commit comments