Skip to content

Commit

Permalink
Fix rescursive rel (#13)
Browse files Browse the repository at this point in the history
* Fix recursive rel property rendering

* Force dev mode for npm serve
  • Loading branch information
mewim authored Oct 10, 2023
1 parent 63d17fc commit 4cf1d00
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "nodemon --exec \"vue-cli-service serve\"",
"serve": "NODE_ENV=development nodemon --exec \"vue-cli-service serve\"",
"serve-prod": "NODE_ENV=production node src/server/index.js",
"build": "KUZU_PATH=. vue-cli-service build",
"lint": "vue-cli-service lint",
Expand Down
12 changes: 7 additions & 5 deletions src/components/ShellView/ResultGraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -416,36 +416,38 @@ export default {
for (let key in row) {
switch (dataTypes[key]) {
case DATA_TYPES.NODE: {
const node = row[key];
const node = { ...row[key] };
processNode(node);
break;
}
case DATA_TYPES.REL: {
const rel = row[key];
const rel = { ...row[key] };
processRel(rel);
break;
}
case DATA_TYPES.RECURSIVE_REL: {
const recursiveRel = row[key];
const recursiveRel = { ...row[key] };
recursiveRel._nodes.forEach((node) => {
node = { ...node };
const nodeId = this.encodeNodeId(node._id);
if (nodes[nodeId]) {
return;
}
for (let key in node) {
if (!node[key]) {
if (node[key] === null || node[key] === undefined) {
delete node[key];
}
}
processNode(node);
});
recursiveRel._rels.forEach((rel) => {
rel = { ...rel };
const relId = this.encodeRelId(rel._src, rel._dst);
if (edges[relId]) {
return;
}
for (let key in rel) {
if (!rel[key]) {
if (rel[key] === null || rel[key] === undefined) {
delete rel[key];
}
}
Expand Down

0 comments on commit 4cf1d00

Please sign in to comment.