Remove side-effect in override

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-07-06 11:42:46 -04:00
1 parent 2012602e6e
commit 42af68d763
1 file changed
+2 -5
@@ -153,14 +153,11 @@ export const getApplicationBuilder = () => {
mainDi.override(clusterStoreInjectable, () => clusterStoreStub);
mainDi.override(randomBytesInjectable, () => {
let callId = 0;
return async (count) => {
const currentCallId = callId += 1;
const values = new Array(count);
const values = [];
for (let i = 0; i < count; i += 1) {
values[i] = ((i + currentCallId) << 2) ^ currentCallId;
values[i] = i;
}
return Buffer.from(values);