Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/runtime/src/message-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,14 @@ export class MessageType<T extends object> implements IMessageType<T> {
this.typeName = name;
this.fields = fields.map(normalizeFieldInfo);
this.options = options ?? {};
this.messagePrototype = Object.defineProperty({}, MESSAGE_TYPE, { value: this });
this.messagePrototype = this.messagePrototype = Object.defineProperty(
Object.create(
null,
Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}))
),
MESSAGE_TYPE,
{ value: this },
);
this.refTypeCheck = new ReflectionTypeCheck(this);
this.refJsonReader = new ReflectionJsonReader(this);
this.refJsonWriter = new ReflectionJsonWriter(this);
Expand Down