mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 18:56:15 +01:00
chore: eslint no-var, vars-on-top
This commit is contained in:
committed by
Julian Lam
parent
b56d9e12b5
commit
dab3b23575
@@ -384,12 +384,12 @@ Notifications.merge = async function (notifications) {
|
||||
case 'notifications:user_started_following_you':
|
||||
case 'notifications:user_posted_to':
|
||||
case 'notifications:user_flagged_post_in':
|
||||
case 'notifications:user_flagged_user':
|
||||
var usernames = _.uniq(set.map(notifObj => notifObj && notifObj.user && notifObj.user.username));
|
||||
var numUsers = usernames.length;
|
||||
case 'notifications:user_flagged_user': {
|
||||
const usernames = _.uniq(set.map(notifObj => notifObj && notifObj.user && notifObj.user.username));
|
||||
const numUsers = usernames.length;
|
||||
|
||||
var title = utils.decodeHTMLEntities(notifications[modifyIndex].topicTitle || '');
|
||||
var titleEscaped = title.replace(/%/g, '%').replace(/,/g, ',');
|
||||
const title = utils.decodeHTMLEntities(notifications[modifyIndex].topicTitle || '');
|
||||
let titleEscaped = title.replace(/%/g, '%').replace(/,/g, ',');
|
||||
titleEscaped = titleEscaped ? (`, ${titleEscaped}`) : '';
|
||||
|
||||
if (numUsers === 2) {
|
||||
@@ -399,7 +399,7 @@ Notifications.merge = async function (notifications) {
|
||||
}
|
||||
|
||||
notifications[modifyIndex].path = set[set.length - 1].path;
|
||||
break;
|
||||
} break;
|
||||
|
||||
case 'new_register':
|
||||
notifications[modifyIndex].bodyShort = `[[notifications:${mergeId}_multiple, ${set.length}]]`;
|
||||
|
||||
Reference in New Issue
Block a user