mirror of
https://github.com/discourse/discourse.git
synced 2025-03-28 05:45:42 +08:00
REFACTOR: Remove _.union
This commit is contained in:
parent
e60d06d880
commit
0b098566ff
@ -140,7 +140,7 @@ function imagesExtensions(staff, siteSettings) {
|
||||
const staffExts = staffExtensions(siteSettings).filter(ext =>
|
||||
IMAGES_EXTENSIONS_REGEX.test(ext)
|
||||
);
|
||||
exts = _.union(exts, staffExts);
|
||||
exts = exts.concat(staffExts);
|
||||
}
|
||||
return exts;
|
||||
}
|
||||
|
@ -215,7 +215,11 @@ export function emojiSearch(term, options) {
|
||||
|
||||
toSearch =
|
||||
toSearch ||
|
||||
_.union(_.keys(emojiHash), _.keys(extendedEmoji), _.keys(aliasHash)).sort();
|
||||
[
|
||||
...Object.keys(emojiHash),
|
||||
...Object.keys(extendedEmoji),
|
||||
...Object.keys(aliasHash)
|
||||
].sort();
|
||||
|
||||
const results = [];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user