Skip to content

Commit e3c67e5

Browse files
nezia1Anthony Rodriguez
andauthored
🐛 FIX: Sorting China
Co-authored-by: Anthony Rodriguez <contact@nezia.xyz>
1 parent 86b889a commit e3c67e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/getCountries.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ module.exports = async (
2222
handleError(`API is down, try again later.`, err, false);
2323
let allCountries = response.data;
2424

25-
// Limit.
26-
allCountries = allCountries.slice(0, limit);
27-
2825
// Sort & reverse.
2926
const direction = reverse ? 'asc' : 'desc';
3027
allCountries = orderBy(
@@ -33,6 +30,9 @@ module.exports = async (
3330
[direction]
3431
);
3532

33+
// Limit.
34+
allCountries = allCountries.slice(0, limit);
35+
3636
// Push selected data.
3737
allCountries.map((oneCountry, count) => {
3838
table.push([

0 commit comments

Comments
 (0)