Skip to content

Commit

Permalink
Make sure to always create an array of proctors
Browse files Browse the repository at this point in the history
  • Loading branch information
mivano committed May 13, 2024
1 parent 3c56077 commit 6ba7b5a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions generate-venues.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ async function main() {
//console.log(venue);
// Create a slug from the venue name
const slug = slugify(venue.venueName, { lower: true });

const proctors = Array.isArray(venue.proctors) ? venue.proctors : [venue.proctors];

var content = venue.__content;

// Check if content exists
Expand All @@ -65,7 +66,7 @@ async function main() {
primaryUsername: "${venue.primaryContact?.username || venue.primaryUsername}"
secondaryContactName: "${venue.secondaryContact?.name || venue.secondaryContactName}"
secondaryUsername: "${venue.secondaryContact?.username || ""}"
proctors: ${JSON.stringify(venue.proctors)}
proctors: ${JSON.stringify(proctors)}
canSignup: ${venue.canSignup}
isShown: ${venue.isShown}
---
Expand Down

0 comments on commit 6ba7b5a

Please sign in to comment.