From 2ee3ee7a3f33b967806a946c06b299fa623bebcd Mon Sep 17 00:00:00 2001 From: Anthony Tseng Date: Sat, 11 Feb 2017 17:00:21 +0800 Subject: [PATCH] Preserve order when exporting bookmarks fix #7189 Auditors: @bbondy, @NejcZdovc Test Plan: 1. Import a lot of bookmarks. 2. Export bookmarks to a file. (file A) 3. Delete all the bookmarks 4. Import from file A 5. The bookmarks order should be the same as step 1 --- app/browser/bookmarksExporter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/browser/bookmarksExporter.js b/app/browser/bookmarksExporter.js index 092b8bc377c..072412ad2ba 100644 --- a/app/browser/bookmarksExporter.js +++ b/app/browser/bookmarksExporter.js @@ -52,7 +52,7 @@ function createBookmarkArray (sites, parentFolderId, first = true, depth = 1) { if (first) payload.push(`${indentFirst}

`) - filteredBookmarks.forEach((site) => { + filteredBookmarks.toList().sort(siteUtil.siteSort).forEach((site) => { if (site.get('tags').includes(siteTags.BOOKMARK) && site.get('location')) { title = site.get('customTitle') || site.get('title') || site.get('location') payload.push(`${indentNext}

${title}`)