mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:48:26 -06:00
FIX: Convert jQuery array to JS array
This commit is contained in:
parent
5e5d5b4f35
commit
720cd57fb5
@ -64,11 +64,13 @@ function updateFound($mentions, usernames) {
|
||||
export function linkSeenMentions($elem, siteSettings) {
|
||||
const $mentions = $("span.mention:not(.mention-tested)", $elem);
|
||||
if ($mentions.length) {
|
||||
const usernames = $mentions.map((_, e) =>
|
||||
$(e)
|
||||
.text()
|
||||
.substr(1)
|
||||
);
|
||||
const usernames = [
|
||||
...$mentions.map((_, e) =>
|
||||
$(e)
|
||||
.text()
|
||||
.substr(1)
|
||||
)
|
||||
];
|
||||
updateFound($mentions, usernames);
|
||||
return usernames
|
||||
.uniq()
|
||||
|
Loading…
Reference in New Issue
Block a user