Skip to content

Commit

Permalink
Wrap UI creation in try catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
tmetzl committed Oct 24, 2023
1 parent 1cadd7f commit 791f267
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -699,10 +699,15 @@ let createAssignmentModal = function () {

let tbl = $("#main-table");
let row = insertRow(tbl);
new AssignmentUI({
model: model,
el: row,
});
try {
new AssignmentUI({
model: model,
el: row,
});
} catch (e) {
console.err("Failed to create new view", e);
}

model.save();
tbl.parent().DataTable().row.add(row).draw();

Expand Down

0 comments on commit 791f267

Please sign in to comment.