From 919d7c12a1c77d6e458f184586933e4212747676 Mon Sep 17 00:00:00 2001 From: Thomas Nilefalk Date: Mon, 8 Feb 2021 17:26:55 +0100 Subject: [PATCH] fix: syntax error in rebuild-tree.js (#3048) --- server/jobs/rebuild-tree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/jobs/rebuild-tree.js b/server/jobs/rebuild-tree.js index a91e7e40..53d3898a 100644 --- a/server/jobs/rebuild-tree.js +++ b/server/jobs/rebuild-tree.js @@ -57,7 +57,7 @@ module.exports = async (pageId) => { await WIKI.models.knex.table('pageTree').truncate() if (tree.length > 0) { // -> Save in chunks, because of per query max parameters (35k Postgres, 2k MSSQL, 1k for SQLite) - if ((WIKI.config.db.type !== 'sqlite')) + if ((WIKI.config.db.type !== 'sqlite')) { for (const chunk of _.chunk(tree, 100)) { await WIKI.models.knex.table('pageTree').insert(chunk) }