mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -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) {
|
export function linkSeenMentions($elem, siteSettings) {
|
||||||
const $mentions = $("span.mention:not(.mention-tested)", $elem);
|
const $mentions = $("span.mention:not(.mention-tested)", $elem);
|
||||||
if ($mentions.length) {
|
if ($mentions.length) {
|
||||||
const usernames = $mentions.map((_, e) =>
|
const usernames = [
|
||||||
|
...$mentions.map((_, e) =>
|
||||||
$(e)
|
$(e)
|
||||||
.text()
|
.text()
|
||||||
.substr(1)
|
.substr(1)
|
||||||
);
|
)
|
||||||
|
];
|
||||||
updateFound($mentions, usernames);
|
updateFound($mentions, usernames);
|
||||||
return usernames
|
return usernames
|
||||||
.uniq()
|
.uniq()
|
||||||
|
Loading…
Reference in New Issue
Block a user