mirror of
https://github.com/outline/outline.git
synced 2026-04-28 13:39:30 -05:00
Updated ImportJsonTask file mapDocuments method to use unshift instead of push for sorting order (#8183)
This commit is contained in:
@@ -73,7 +73,9 @@ export default class ImportJSONTask extends ImportTask {
|
||||
) {
|
||||
Object.values(documents).forEach((node) => {
|
||||
const id = uuidv4();
|
||||
output.documents.push({
|
||||
// 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({
|
||||
...node,
|
||||
path: "",
|
||||
// populate text to maintain consistency with existing data.
|
||||
|
||||
Reference in New Issue
Block a user