1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

[ticket/16405] Update code for eslint and stylelint updates

PHPBB3-16405
This commit is contained in:
Marc Alexander
2022-04-16 17:06:12 +02:00
parent 68cb599354
commit 620ee4d85b
5 changed files with 14 additions and 16 deletions

View File

@@ -194,9 +194,7 @@
});
// Sort names by priorities - higher values come first
_results = _results.sort((a, b) => {
return b.priority - a.priority;
});
_results = _results.sort((a, b) => b.priority - a.priority);
// Exact match is the most important - should come above anything else
$.each(_exactMatch, (name, value) => {
@@ -233,9 +231,9 @@
* 2) We have enough names to display OR
* all relevant names have been fetched from the server
*/
if (cachedNamesForQuery &&
(getMatchedNames(query, cachedNamesForQuery, cachedSearchKey).length >= mentionNamesLimit ||
cachedAll[cachedKeyword])) {
if (cachedNamesForQuery
&& (getMatchedNames(query, cachedNamesForQuery, cachedSearchKey).length >= mentionNamesLimit
|| cachedAll[cachedKeyword])) {
callback(cachedNamesForQuery);
return;
}