Skip to content

Commit

Permalink
fix: syntax error in rebuild-tree.js (requarks#3048)
Browse files Browse the repository at this point in the history
  • Loading branch information
thoni56 authored Feb 8, 2021
1 parent 8ec2b4c commit 002a4cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/jobs/rebuild-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 002a4cc

Please sign in to comment.