Merge pull request #1741 from SevanNerse/master

naming of variables updated and redundancy created by use of the comp…
This commit is contained in:
Cüneyt Şentürk 2021-01-09 16:50:37 +03:00 committed by GitHub
commit ad68183987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -383,15 +383,15 @@ export default {
methods: {
sortBy(option) {
return (a, b) => {
var nameA = a.[option].toUpperCase(); // ignore upper and lowercase
var nameB = b.[option].toUpperCase(); // ignore upper and lowercase
return (firstEl, secondEl) => {
let first_element = firstEl[option].toUpperCase(); // ignore upper and lowercase
let second_element = secondEl[option].toUpperCase(); // ignore upper and lowercase
if (nameA < nameB) {
if (first_element < second_element) {
return -1;
}
if (nameA > nameB) {
if (first_element > second_element) {
return 1;
}

View File

@ -450,15 +450,15 @@ export default {
methods: {
sortBy(option) {
return (a, b) => {
var nameA = a.[option].toUpperCase(); // ignore upper and lowercase
var nameB = b.[option].toUpperCase(); // ignore upper and lowercase
return (firstEl, secondEl) => {
let first_element = firstEl[option].toUpperCase(); // ignore upper and lowercase
let second_element = secondEl[option].toUpperCase(); // ignore upper and lowercase
if (nameA < nameB) {
if (first_element < second_element) {
return -1;
}
if (nameA > nameB) {
if (first_element > second_element) {
return 1;
}