Skip to content

Commit

Permalink
Fix "Cannot read property 'match' of undefined" (#232)
Browse files Browse the repository at this point in the history
* Fix "Cannot read property 'match' of undefined"

* Revert "Temporarily disable tests"

This reverts commit 369bb5e.

* Revert "Revert "Temporarily disable tests""

This reverts commit 49dabe2.
  • Loading branch information
michaelgira23 authored Sep 19, 2023
1 parent 369bb5e commit 3ec75a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libs/canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export async function getUserCal(db: Db, user: string) {
* @returns Parsed class and teacher data.
*/
function parseCanvasTitle(title: string) {
title = title || '';
const classTeacherRegex = /\[[^[]+]$/g;
const teacherRegex = /:[A-Z]{5}$/g;
const firstLastBrackets = /(^\[)|(]$)/g;
Expand Down

0 comments on commit 3ec75a7

Please sign in to comment.