miantalha45 commented on code in PR #3394:
URL: https://github.com/apache/fory/pull/3394#discussion_r3044624609
##########
javascript/packages/core/lib/typeMetaResolver.ts:
##########
@@ -61,6 +61,8 @@ export class TypeMetaResolver {
const typeId = typeMeta.getTypeId();
const userTypeId = typeMeta.getUserTypeId();
if (!TypeId.structType(typeId)) {
+ const existing = this.fory.typeResolver.getSerializerById(typeId,
userTypeId);
Review Comment:
This was added to handle non-struct types (like unions) that go through the
TypeMeta path during compatible-mode deserialization. In struct.ts, the default
case calls genSerializerByTypeMetaRuntime for any typeId in compatible mode
including unions. Without this fallback, encountering a union TypeMeta would
throw "only support reconstructor struct type" even though a serializer for it
is already registered.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]