catch the split error

This commit is contained in:
HB9HIL
2024-09-08 20:08:09 +02:00
parent a8056e930a
commit 98a10d5752

View File

@@ -100,8 +100,17 @@ async function reset_contest_session() {
}
function sort_exchange() {
// Get the selected sequence
let exchangeSelect = $('#exchangesequence_select');
// If the sequence is not set, we need to set one to prevent errors
if (!exchangeSelect.val()) {
exchangeSelect.val('s-g-e');
}
// Split the squence into an array
var selectedOrder = $('#exchangesequence_select').val().split('-');
let selectedOrder = exchangeSelect.val().split('-');
// Map sequence to corresponding SENT elements
let mapping = {