mirror of https://github.com/waku-org/js-waku.git
fix: set default value for version if not on the wire
This commit is contained in:
parent
a58691aabd
commit
db22c2e86b
|
@ -273,8 +273,10 @@ export class WakuMessage {
|
|||
return this.proto.contentTopic;
|
||||
}
|
||||
|
||||
get version(): number | undefined {
|
||||
return this.proto.version;
|
||||
get version(): number {
|
||||
// TODO: absent value should be replaced by default
|
||||
// value of the type by the protobuf decoder
|
||||
return this.proto.version ?? 0;
|
||||
}
|
||||
|
||||
get timestamp(): Date | undefined {
|
||||
|
|
Loading…
Reference in New Issue