提交 feed1df8 编写于 作者: J jsers

fix: failed to load the bind node

上级 91a4648c
......@@ -76,7 +76,10 @@ class index extends Component<Props, State> {
processData = async (endpoints: Endpoint[]) => {
if (this.state.displayBindNode && endpoints) {
const idents = _.map(endpoints, item => item.ident);
const endpointNodes = await request(`${api.endpoint}s/bindings?idents=${_.join(idents, ',')}`);
let endpointNodes: any[] = [];
if (idents.length) {
endpointNodes = await request(`${api.endpoint}s/bindings?idents=${_.join(idents, ',')}`);
}
const newEndpoints = _.map(endpoints, (item) => {
const current = _.find(endpointNodes, { ident: item.ident });
const nodes = _.get(current, 'nodes', []);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册