From a002eecd038bd8f17f3d503d5ed5e07f210d0c9c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 16 Aug 2016 12:16:32 +0300 Subject: [PATCH] dont crash if set is not defined, closes https://github.com/NodeBB/nodebb-plugin-leaderboard/issues/4 --- src/controllers/users.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controllers/users.js b/src/controllers/users.js index 4ee7e5a9ec..20ea62ca40 100644 --- a/src/controllers/users.js +++ b/src/controllers/users.js @@ -102,6 +102,10 @@ usersController.getUsers = function(set, uid, page, callback) { 'users:flags': {title: '[[pages:users/most-flags]]', crumb: '[[users:most_flags]]'}, }; + if (!setToData[set]) { + setToData[set] = {title: '', crumb: ''}; + } + var breadcrumbs = [{text: setToData[set].crumb}]; if (set !== 'users:joindate') {