Skip to content

Commit

Permalink
Merge pull request brave#7204 from darkdh/7170
Browse files Browse the repository at this point in the history
Perserve order for siteUtils.getFolders
  • Loading branch information
bbondy authored Feb 12, 2017
2 parents 0a5c60b + c9f7fd1 commit b9e4ed0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/state/siteUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ module.exports.isHistoryEntry = function (siteDetail) {
module.exports.getFolders = function (sites, folderId, parentId, labelPrefix) {
parentId = parentId || 0
let folders = []
sites.forEach((site) => {
sites.toList().sort(module.exports.siteSort).forEach((site) => {
if ((site.get('parentFolderId') || 0) === parentId && module.exports.isFolder(site)) {
if (site.get('folderId') === folderId) {
return
Expand Down

0 comments on commit b9e4ed0

Please sign in to comment.