From 44e8c1e1c9124b36a78f775b9a7dd12152a71d98 Mon Sep 17 00:00:00 2001 From: rstular Date: Sun, 17 May 2020 14:15:35 +0200 Subject: GSEC bug fix - regex matching --- assets/js/gsec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'assets') diff --git a/assets/js/gsec.js b/assets/js/gsec.js index 6c3de0f..d0e5fbb 100644 --- a/assets/js/gsec.js +++ b/assets/js/gsec.js @@ -314,7 +314,8 @@ class gsec { for (const subjectString of subjectStrings) { var subjectName = SUBJECT_REGEX.exec(stripHtml(subjectString))[1]; - var abkurzung = ABKURZUNG_REGEX.exec(stripHtml(subjectString))[1]; + var abkurzung = ABKURZUNG_REGEX.exec(stripHtml(subjectString)); + abkurzung = abkurzung == null ? subjectName : abkurzung[1]; subjects[abkurzung] = subjectName; } -- cgit v1.2.3