From 86bddaf4b64198ba7a8541feb539192da2a25332 Mon Sep 17 00:00:00 2001 From: Nathan Wang Date: Fri, 3 Jul 2020 14:13:26 -0700 Subject: [PATCH] bugfix --- content/models.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/models.ts b/content/models.ts index be2b502..eef56b5 100644 --- a/content/models.ts +++ b/content/models.ts @@ -32,8 +32,8 @@ export class Problem { public tags?: string[], public sketch?: string, ) { - this.isIntro = labels.includes("Intro|"); - labels = labels.replace("Intro|", "") as any; + this.isIntro = labels && labels.includes("Intro|"); + if (labels) labels = labels.replace("Intro|", "") as any; this.difficulty = labels as any; if (!id.startsWith("http")) { if (source in sources) {