diff options
author | rstular <rok@stular.eu> | 2020-06-01 20:14:59 +0200 |
---|---|---|
committer | rstular <rok@stular.eu> | 2020-06-02 16:05:48 +0200 |
commit | 58ab0d4c8a33919740a35d1223f31c12d783f599 (patch) | |
tree | c4eed9057aa50057aada8d58bea6801fa58cfa55 /assets/js | |
parent | Branch rename (diff) | |
download | beziapp-58ab0d4c8a33919740a35d1223f31c12d783f599.tar beziapp-58ab0d4c8a33919740a35d1223f31c12d783f599.tar.gz beziapp-58ab0d4c8a33919740a35d1223f31c12d783f599.tar.bz2 beziapp-58ab0d4c8a33919740a35d1223f31c12d783f599.tar.lz beziapp-58ab0d4c8a33919740a35d1223f31c12d783f599.tar.xz beziapp-58ab0d4c8a33919740a35d1223f31c12d783f599.tar.zst beziapp-58ab0d4c8a33919740a35d1223f31c12d783f599.zip |
Diffstat (limited to 'assets/js')
-rw-r--r-- | assets/js/gsec.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/assets/js/gsec.js b/assets/js/gsec.js index 19e190f..5632949 100644 --- a/assets/js/gsec.js +++ b/assets/js/gsec.js @@ -273,8 +273,10 @@ class gsec { } rowSpan.remove(); // magic - var subject = SUBJECT_REGEX.exec(subFields[1].innerHTML)[1].trim(); - var desc = DESC_REGEX.exec(subFields[1].innerHTML)[1]; + var subject = SUBJECT_REGEX.exec(subFields[1].innerHTML) + subject = subject == null ? "" : subject[1].trim(); + var desc = DESC_REGEX.exec(subFields[1].innerHTML); + desc = desc == null ? "" : desc[1]; gradings.push({ "date": dateObj, @@ -529,7 +531,7 @@ class gsec { "__EVENTARGUMENT": "Select$" + selectId }; - this.postback(GSE_URL+"Page_Gim/Uporabnik/Sporocila.aspx", dataToBeSent, null, true).then((response) => { + this.postback(GSE_URL + "Page_Gim/Uporabnik/Sporocila.aspx", dataToBeSent, null, true).then((response) => { let parser = new DOMParser(); let parsed = parser.parseFromString(response.data, "text/html"); let subject = parsed.getElementsByClassName("msgSubjectS")[0].innerHTML.trim(); |