Skip to content

Commit

Permalink
fix: remove self-assignment (vuejs#4422)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRuf authored and pksunkara committed Aug 15, 2019
1 parent 6918792 commit 7a51eac
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/@vue/cli-ui-addon-webpack/src/util/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function buildSortedAssets (assets, sizeField) {
speeds: getSpeeds(size)
}
})
list = list.sort((a, b) => {
list.sort((a, b) => {
if (a.secondary === b.secondary) {
return b.size - a.size
} else if (a.secondary && !b.secondary) {
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-ui/apollo-server/connectors/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ async function list ({ file = null, api = true } = {}, context) {
if (index !== -1) return index
return Infinity
}
list = list.sort((a, b) => getSortScore(a) - getSortScore(b))
list.sort((a, b) => getSortScore(a) - getSortScore(b))

tasks.set(file, list)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-ui/ui-defaults/utils/audit.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ exports.auditProject = async function (cwd) {
}
}

auditAdvisories = auditAdvisories.sort((a, b) => severity[a.data.advisory.severity] - severity[b.data.advisory.severity])
auditAdvisories.sort((a, b) => severity[a.data.advisory.severity] - severity[b.data.advisory.severity])

let id = 0
for (const { data: { advisory } } of auditAdvisories) {
Expand Down
4 changes: 2 additions & 2 deletions packages/@vue/cli-ui/ui-defaults/utils/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports.buildSortedModules = function (modules, sizeField) {
size
}
})
list = list.sort((a, b) => b.size - a.size)
list.sort((a, b) => b.size - a.size)
}
return list
}
Expand Down Expand Up @@ -47,7 +47,7 @@ exports.buildDepModules = function (modules) {
}
}
let list = Array.from(deps.values())
list = list.sort((a, b) => b.size - a.size)
list.sort((a, b) => b.size - a.size)
if (list.length) {
const max = list[0].size
for (const dep of list) {
Expand Down

0 comments on commit 7a51eac

Please sign in to comment.