Crash on configuration when theme no longer exists #157
This commit is contained in:
parent
66423068b1
commit
4acbae86e3
|
@ -174,9 +174,9 @@ exports.getModule = class UserConfigModule extends MenuModule {
|
||||||
};
|
};
|
||||||
}), 'name');
|
}), '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;
|
return ti.themeId === self.client.user.properties.theme_id;
|
||||||
});
|
}));
|
||||||
|
|
||||||
callback(null);
|
callback(null);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue