Crash on configuration when theme no longer exists #157

This commit is contained in:
Bryan Ashby 2018-03-13 19:22:26 -06:00
parent 66423068b1
commit 4acbae86e3
1 changed files with 2 additions and 2 deletions

View File

@ -174,9 +174,9 @@ exports.getModule = class UserConfigModule extends MenuModule {
};
}), 'name');
currentThemeIdIndex = _.findIndex(self.availThemeInfo, function cmp(ti) {
currentThemeIdIndex = Math.max(0, _.findIndex(self.availThemeInfo, function cmp(ti) {
return ti.themeId === self.client.user.properties.theme_id;
});
}));
callback(null);
},