UNCLASSIFIED

Commit f7bb535d authored by Keith Becker's avatar Keith Becker
Browse files

rename variable

parent 2c4bd992
...@@ -23,11 +23,11 @@ export const canAddStudentsToCourse = ( ...@@ -23,11 +23,11 @@ export const canAddStudentsToCourse = (
registrations registrations
) => { ) => {
//default to allow //default to allow
let canAddStudentsToCourse = true; let canAddToCourse = true;
//check if course is selected //check if course is selected
if (!isCourseSelected) { if (!isCourseSelected) {
canAddStudentsToCourse = false; canAddToCourse = false;
} }
//check if seats are available //check if seats are available
...@@ -37,16 +37,16 @@ export const canAddStudentsToCourse = ( ...@@ -37,16 +37,16 @@ export const canAddStudentsToCourse = (
registrations registrations
); );
if (seatsAvailable < 0) { if (seatsAvailable < 0) {
canAddStudentsToCourse = false; canAddToCourse = false;
} }
//check if selected members is an array //check if selected members is an array
if (!Array.isArray(selectedMembers)) { if (!Array.isArray(selectedMembers)) {
canAddStudentsToCourse = false; canAddToCourse = false;
} else if (selectedMembers.length <= 0) { } else if (selectedMembers.length <= 0) {
canAddStudentsToCourse = false; canAddToCourse = false;
} }
//return boolean //return boolean
return canAddStudentsToCourse; return canAddToCourse;
}; };
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment