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