You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by em...@apache.org on 2021/12/13 01:41:18 UTC
[incubator-age-viewer] branch main updated: fix: Corrects parsing for independence value
This is an automated email from the ASF dual-hosted git repository.
emotionbug pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-age-viewer.git
The following commit(s) were added to refs/heads/main by this push:
new d4b0310 fix: Corrects parsing for independence value
d4b0310 is described below
commit d4b031088cbb08e9b703bc011ca198f4553c0dcc
Author: Alex Kwak <ta...@kakao.com>
AuthorDate: Mon Dec 13 10:40:53 2021 +0900
fix: Corrects parsing for independence value
---
backend/src/tools/CustomAgTypeListener.js | 2 +-
backend/test/ageParsing.test.js | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/backend/src/tools/CustomAgTypeListener.js b/backend/src/tools/CustomAgTypeListener.js
index 6017743..ef60eae 100644
--- a/backend/src/tools/CustomAgTypeListener.js
+++ b/backend/src/tools/CustomAgTypeListener.js
@@ -155,7 +155,7 @@ class CustomAgTypeListener extends AgtypeListener {
}
getResult() {
- return this.rootObject;
+ return this.rootObject || this.lastValue;
}
}
diff --git a/backend/test/ageParsing.test.js b/backend/test/ageParsing.test.js
index 88796b1..b3c7f0f 100644
--- a/backend/test/ageParsing.test.js
+++ b/backend/test/ageParsing.test.js
@@ -72,6 +72,7 @@ describe('Test Connector Api', () => {
]);
done();
});
+
it('Edge', (done) => {
const ret = AGTypeParse('{"id": 1125899906842625, "label": "used_by", "end_id": 844424930131970, "start_id": 844424930131969, "properties": {"quantity": 1}}::edge');
assert.deepStrictEqual(ret, {
@@ -84,4 +85,9 @@ describe('Test Connector Api', () => {
done();
});
+ it('String', (done) => {
+ const ret = AGTypeParse('"parent"');
+ assert.deepStrictEqual(ret, 'parent');
+ done();
+ });
});