You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2025/09/02 16:39:35 UTC
(tinkerpop) branch master updated: Fix compile problem in gremlin-javascript CTR
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/master by this push:
new 069d633e02 Fix compile problem in gremlin-javascript CTR
069d633e02 is described below
commit 069d633e024dca8795bf5d1e7c979811845d3d8d
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Tue Sep 2 12:39:17 2025 -0400
Fix compile problem in gremlin-javascript CTR
---
.../gremlin-javascript/lib/structure/graph.ts | 23 +++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.ts b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.ts
index 117ba617eb..f4e1c14cd3 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.ts
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.ts
@@ -93,17 +93,18 @@ export class Edge<
) {
super(id, label);
if (properties) {
- if (Array.isArray(properties)) {
- // Handle array of Property objects
- properties.forEach((prop) => {
- // Use type assertion to inform TypeScript that prop.key is a valid key for TProperties
- (this.properties as any)[prop.key] = prop.value;
- });
- } else {
- // Handle object format as before
- Object.keys(properties).forEach((k) => {
- (this.properties as any)[k] = properties[k].value;
- });
+ if (Array.isArray(properties)) {
+ // Handle array of Property objects
+ properties.forEach((prop) => {
+ // Use type assertion to inform TypeScript that prop.key is a valid key for TProperties
+ (this.properties as any)[prop.key] = prop.value;
+ });
+ } else {
+ // Handle object format as before
+ Object.keys(properties).forEach((k) => {
+ (this.properties as any)[k] = properties[k].value;
+ });
+ }
}
}