Skip to content

Commit

Permalink
fixed(node setting): the shcema api isnot triggered when the node plu…
Browse files Browse the repository at this point in the history
…gin is not found
  • Loading branch information
orangegzx authored and zuxia.ge committed Feb 7, 2023
1 parent bb74394 commit 59d6d55
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/composables/config/useNodeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,16 @@ export default (props: Props) => {
const pluginMsgName = pluginMsgIdMap[pluginName]?.name

const nodePluginName = pluginMsgName || pluginName
if (nodePluginName) {
const { data } = await queryPluginConfigInfo(nodePluginName)
const pluginInfo: PluginInfo = data
if (!pluginInfo) {
defaultConfigData.value = {}
fieldList.value = []
return
}
const pluginInitInfo = initFormFromPluginInfo(pluginInfo)
defaultConfigData.value = cloneDeep(pluginInitInfo)
fieldList.value = createFieldListFormPluginInfo(pluginInfo)
const { data } = await queryPluginConfigInfo(nodePluginName)
const pluginInfo: PluginInfo = data
if (!pluginInfo) {
defaultConfigData.value = {}
fieldList.value = []
return
}
const pluginInitInfo = initFormFromPluginInfo(pluginInfo)
defaultConfigData.value = cloneDeep(pluginInitInfo)
fieldList.value = createFieldListFormPluginInfo(pluginInfo)
}

// init data
Expand Down

0 comments on commit 59d6d55

Please sign in to comment.