From bfc9ca8a3cb7d2ca3ecaecc8b246314906cee9a0 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 15 Jan 2025 06:58:10 -0800 Subject: [PATCH] =?UTF-8?q?Revert=20"Updated=20ImportJsonTask=20file=20map?= =?UTF-8?q?Documents=20method=20to=20use=20unshift=20instea=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9cab40419421ce9910900c68b4eea1d18e55c106. --- server/queues/tasks/ImportJSONTask.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/queues/tasks/ImportJSONTask.ts b/server/queues/tasks/ImportJSONTask.ts index 44f5cdda0e..af81f1d76b 100644 --- a/server/queues/tasks/ImportJSONTask.ts +++ b/server/queues/tasks/ImportJSONTask.ts @@ -73,9 +73,7 @@ export default class ImportJSONTask extends ImportTask { ) { Object.values(documents).forEach((node) => { const id = uuidv4(); - // Using unshift instead of push to maintain the correct order of documents - // because addDocumentToStructure uses index 0 for insertion, reversing the order - output.documents.unshift({ + output.documents.push({ ...node, path: "", // populate text to maintain consistency with existing data.