Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove self-assignment #4422

Merged
merged 1 commit into from
Aug 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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