Clarify level variable name

This commit is contained in:
J. Ryan Stinnett 2019-04-04 10:30:23 +01:00
parent fa88185dee
commit b0f59007f3

View file

@ -73,8 +73,12 @@ module.exports = React.createClass({
_initStateFromProps: function(newProps) { _initStateFromProps: function(newProps) {
// This needs to be done now because levelRoleMap has translated strings // This needs to be done now because levelRoleMap has translated strings
const levelRoleMap = Roles.levelRoleMap(newProps.usersDefault); const levelRoleMap = Roles.levelRoleMap(newProps.usersDefault);
const options = Object.keys(levelRoleMap).filter((l) => { const options = Object.keys(levelRoleMap).filter(level => {
return l === undefined || l <= newProps.maxValue || l == newProps.value; return (
level === undefined ||
level <= newProps.maxValue ||
level == newProps.value
);
}); });
const isCustom = levelRoleMap[newProps.value] === undefined; const isCustom = levelRoleMap[newProps.value] === undefined;