mirror of
https://github.com/waku-org/js-waku.git
synced 2025-01-12 21:44:33 +00:00
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…
x
Reference in New Issue
Block a user