Skip to content

Commit

Permalink
Fix display of validation errors
Browse files Browse the repository at this point in the history
Newbytee committed Jan 18, 2021
1 parent 1d296ff commit 264b34a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/index.js
Original file line number Diff line number Diff line change
@@ -575,9 +575,9 @@ function handleRenderRequest(form) {

getScheduleJSON(className, form[0].value, form[3].selectedIndex)
.then(scheduleJSON => {
if (scheduleJSON.data.timetableJson === null) {
if (scheduleJSON.validation.length !== 0) {
const message = scheduleJSON.validation[0].message;
setScheduleStatusText(SCHEDULE_MOUNT, message);
setScheduleStatusText(SCHEDULE_MOUNT, "Något gick snett: " + message);
return;
}
removeScheduleStatusText(SCHEDULE_MOUNT);

0 comments on commit 264b34a

Please sign in to comment.