From b5dca68a834155d7d9568c40f370bda4bcf3c9a0 Mon Sep 17 00:00:00 2001 From: supaiku Date: Wed, 17 Oct 2018 17:33:23 +0200 Subject: [PATCH] fix: cast delegate round to number --- packages/core-database-postgres/lib/connection.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core-database-postgres/lib/connection.js b/packages/core-database-postgres/lib/connection.js index 09056528cd..c826ac2fe4 100644 --- a/packages/core-database-postgres/lib/connection.js +++ b/packages/core-database-postgres/lib/connection.js @@ -164,6 +164,8 @@ module.exports = class PostgresConnection extends ConnectionInterface { let currentSeed = crypto.createHash('sha256').update(seedSource, 'utf8').digest() for (let i = 0, delCount = data.length; i < delCount; i++) { + data[i].round = +round + for (let x = 0; x < 4 && i < delCount; i++, x++) { const newIndex = currentSeed[x] % delCount const b = data[newIndex]