mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
use includes instead of indexOf
use _.uniq instead of filter&indexOf
This commit is contained in:
@@ -39,8 +39,8 @@ social.getPostSharing = function (callback) {
|
||||
db.getSetMembers('social:posts.activated', next);
|
||||
},
|
||||
function (activated, next) {
|
||||
networks.forEach(function (network, i) {
|
||||
networks[i].activated = (activated.indexOf(network.id) !== -1);
|
||||
networks.forEach(function (network) {
|
||||
network.activated = activated.includes(network.id);
|
||||
});
|
||||
|
||||
social.postSharing = networks;
|
||||
|
||||
Reference in New Issue
Block a user