mirror of
https://github.com/status-im/js-waku.git
synced 2025-02-23 18:38:11 +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;
|
return this.proto.contentTopic;
|
||||||
}
|
}
|
||||||
|
|
||||||
get version(): number | undefined {
|
get version(): number {
|
||||||
return this.proto.version;
|
// 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 {
|
get timestamp(): Date | undefined {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user