Skip to content

Commit f31639a

Browse files
committed
fix composite db blank results
1 parent f868828 commit f31639a

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/browser/modules/Stream/CypherFrame/VisualizationView/VisualizationView.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,10 @@ export class Visualization extends Component<
164164
const existingNodeIds = existingNodes.map(node => parseInt(node.id))
165165
const newNodeIds = newNodes.map(node => parseInt(node.id))
166166

167-
this.getInternalRelationships(existingNodeIds, newNodeIds)
168-
.then(graph => {
169-
this.autoCompleteCallback &&
170-
this.autoCompleteCallback(graph.relationships)
171-
})
172-
.catch(() => undefined)
167+
this.getInternalRelationships(existingNodeIds, newNodeIds).then(graph => {
168+
this.autoCompleteCallback &&
169+
this.autoCompleteCallback(graph.relationships)
170+
})
173171
} else {
174172
this.autoCompleteCallback && this.autoCompleteCallback([])
175173
}
@@ -234,7 +232,7 @@ LIMIT ${maxNewNeighbours}`
234232
const existingNodeIds = rawExistingNodeIds.map(neo4j.int).concat(newNodeIds)
235233
const query =
236234
'MATCH (a)-[r]->(b) WHERE id(a) IN $existingNodeIds AND id(b) IN $newNodeIds RETURN r;'
237-
return new Promise((resolve, reject) => {
235+
return new Promise(resolve => {
238236
this.props.bus &&
239237
this.props.bus.self(
240238
CYPHER_REQUEST,
@@ -245,7 +243,8 @@ LIMIT ${maxNewNeighbours}`
245243
},
246244
(response: any) => {
247245
if (!response.success) {
248-
reject(new Error())
246+
console.error(response.error)
247+
resolve({ nodes: [], relationships: [] })
249248
} else {
250249
resolve({
251250
...bolt.extractNodesAndRelationshipsFromRecordsForOldVis(

0 commit comments

Comments
 (0)