Keep protobuf value types distinct from object refs
This commit is contained in:
Vendored
+1
-3
@@ -267,8 +267,7 @@ const protoSymbolFromReflection = (reflection, fallbackVersion) => {
|
||||
version: fallbackVersion,
|
||||
};
|
||||
};
|
||||
const typeRefForField = (field, schemaVersion) => {
|
||||
const symbol = protoSymbolFromReflection(field.resolvedType, schemaVersion);
|
||||
const typeRefForField = (field, _schemaVersion) => {
|
||||
const enumValues = field.resolvedType instanceof protobuf.Enum
|
||||
? Object.entries(field.resolvedType.values)
|
||||
.filter(([_name, value]) => value !== 0)
|
||||
@@ -276,7 +275,6 @@ const typeRefForField = (field, schemaVersion) => {
|
||||
: undefined;
|
||||
return {
|
||||
protoType: field.type,
|
||||
...(symbol ? { symbol } : {}),
|
||||
...(enumValues ? { enumValues } : {}),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user