Skip to content

Commit 97a1254

Browse files
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 0c728b1 commit 97a1254

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/scripts/sync-meetup-events.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function eventFile(event, metadata, groupName) {
102102

103103
async function groups() {
104104
const parsed = JSON.parse(await readFile(GROUPS_FILE, 'utf8'));
105-
if (!Array.isArray(parsed) || !parsed.every(({ urlname }) => typeof urlname === 'string' && urlname)) {
105+
if (!Array.isArray(parsed) || !parsed.every((group) => group && typeof group === 'object' && typeof group.urlname === 'string' && group.urlname)) {
106106
throw new Error(`${GROUPS_FILE} must be an array of Meetup group objects with a urlname.`);
107107
}
108108
return parsed;

0 commit comments

Comments
 (0)