tyler-blip commented on code in PR #3466:
URL: https://github.com/apache/avro/pull/3466#discussion_r2419032703


##########
lang/js/lib/schemas.js:
##########
@@ -2029,10 +2029,23 @@ function getOpts(attrs, opts) {
     throw new Error('invalid type: null (did you mean "null"?)');
   }
   opts = opts || {};
-  opts.registry = opts.registry || {};
-  opts.namespace = attrs.namespace || opts.namespace;
-  opts.logicalTypes = opts.logicalTypes || {};
-  return opts;
+  
+  // Ensure registry and logicalTypes exist and are preserved by reference so 
+  // type definitions can accumulate across recursive calls.
+  if (!opts.registry) {

Review Comment:
   That's correct. I tried that as well, but we need to modify the `opts` 
reference in order for the logic to work.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to