aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/utils
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-05-18 03:14:31 +0200
committerGitHub <noreply@github.com>2023-05-18 09:14:31 +0800
commit4aacc3ac784601339f663881e5cc253e982b3f37 (patch)
treeac5d3d2d8a1b88f190bbef3124e904b6cc3d0463 /web_src/js/utils
parent71451ab8441b67a3629052e29b26b7ac815953f2 (diff)
downloadgitea-4aacc3ac784601339f663881e5cc253e982b3f37.tar.gz
gitea-4aacc3ac784601339f663881e5cc253e982b3f37.zip
Add two eslint plugins (#24776)
Add these two plugins and autofix issues: - [eslint-plugin-no-use-extend-native](https://github.com/dustinspecker/eslint-plugin-no-use-extend-native) - [eslint-plugin-array-func](https://github.com/freaktechnik/eslint-plugin-array-func)
Diffstat (limited to 'web_src/js/utils')
-rw-r--r--web_src/js/utils/match.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/utils/match.js b/web_src/js/utils/match.js
index 0d20ca336f..31763b0940 100644
--- a/web_src/js/utils/match.js
+++ b/web_src/js/utils/match.js
@@ -3,7 +3,7 @@ import emojis from '../../../assets/emoji.json';
const maxMatches = 6;
function sortAndReduce(map) {
- const sortedMap = new Map([...map.entries()].sort((a, b) => a[1] - b[1]));
+ const sortedMap = new Map(Array.from(map.entries()).sort((a, b) => a[1] - b[1]));
return Array.from(sortedMap.keys()).slice(0, maxMatches);
}