1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Remove side-effect in override

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-06-06 15:36:14 -04:00
parent 2012602e6e
commit 42af68d763

View File

@ -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);