From 71590cdc950f86c4ead9a887ad958403e043ef3b Mon Sep 17 00:00:00 2001 From: Sylvain Wallez Date: Wed, 2 Oct 2024 14:19:50 +0200 Subject: [PATCH] GH-30863: [JS] Use a singleton StructRow proxy handler --- js/src/row/struct.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/src/row/struct.ts b/js/src/row/struct.ts index bc3869cb8d08f..074ec91fd64b3 100644 --- a/js/src/row/struct.ts +++ b/js/src/row/struct.ts @@ -39,7 +39,7 @@ export class StructRow { constructor(parent: Data>, rowIndex: number) { this[kParent] = parent; this[kRowIndex] = rowIndex; - return new Proxy(this, new StructRowProxyHandler()); + return new Proxy(this, structRowProxyHandler); } public toArray() { return Object.values(this.toJSON()); } @@ -157,3 +157,5 @@ class StructRowProxyHandler implements ProxyHandler