@peerbit/stream-interface
Advanced tools
Comparing version 3.0.6 to 3.0.7
@@ -107,2 +107,5 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
super(); | ||
if (this.to?.length === 0) { | ||
throw new Error("Invalud value of property 'to', expecting either undefined or an array with more than one element"); | ||
} | ||
this.to = coerceTo(properties.to); | ||
@@ -134,2 +137,5 @@ this.redundancy = properties.redundancy; | ||
super(); | ||
if (this.to?.length === 0) { | ||
throw new Error("Invalud value of property 'to', expecting either undefined or an array with more than one element"); | ||
} | ||
this.to = properties.to ? coerceTo(properties.to) : undefined; | ||
@@ -136,0 +142,0 @@ this.redundancy = properties.redundancy; |
{ | ||
"name": "@peerbit/stream-interface", | ||
"version": "3.0.6", | ||
"version": "3.0.7", | ||
"description": "Block store streaming", | ||
@@ -55,3 +55,3 @@ "type": "module", | ||
}, | ||
"gitHead": "e50907578b203c2f16199e91545c5213cf8cdc3e" | ||
"gitHead": "3ee064de9b5cf0d8a8da2e62c3d3ec0d6c799f05" | ||
} |
@@ -132,2 +132,7 @@ import { | ||
super(); | ||
if (this.to?.length === 0) { | ||
throw new Error( | ||
"Invalud value of property 'to', expecting either undefined or an array with more than one element" | ||
); | ||
} | ||
this.to = coerceTo(properties.to); | ||
@@ -155,2 +160,7 @@ this.redundancy = properties.redundancy; | ||
super(); | ||
if (this.to?.length === 0) { | ||
throw new Error( | ||
"Invalud value of property 'to', expecting either undefined or an array with more than one element" | ||
); | ||
} | ||
this.to = properties.to ? coerceTo(properties.to) : undefined; | ||
@@ -157,0 +167,0 @@ this.redundancy = properties.redundancy; |
Sorry, the diff of this file is not supported yet
59637
1146