forked from ryanmwangi/CalMerger
report unknown error in the case of missing error message
This commit is contained in:
parent
cf52d8e6e4
commit
fe446b1b09
|
@ -23,9 +23,9 @@ const form = document.getElementById('merge-form');
|
||||||
const linkGroupName = document.getElementById('link-group-name').value;
|
const linkGroupName = document.getElementById('link-group-name').value;
|
||||||
const calendarsData = [];
|
const calendarsData = [];
|
||||||
for (let i = 0; i < calendarIndex; i++) {
|
for (let i = 0; i < calendarIndex; i++) {
|
||||||
const prefix = document.getElementById(`prefix-${i}`).value;
|
const prefix = document.getElementById(`prefix-${i}`);
|
||||||
const override = document.getElementById(`override-${i}`).checked;
|
const override = document.getElementById(`override-${i}`);
|
||||||
const url = document.getElementById(`url-${i}`).value;
|
const url = document.getElementById(`url-${i}`);
|
||||||
if (prefix && override && url) {
|
if (prefix && override && url) {
|
||||||
calendarsData.push({
|
calendarsData.push({
|
||||||
prefix: prefix.value,
|
prefix: prefix.value,
|
||||||
|
@ -53,6 +53,6 @@ const form = document.getElementById('merge-form');
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
result.innerHTML = `Error merging calendars: ${error.message}`
|
result.innerHTML = `Error merging calendars: ${error.message || 'Unknown error'}`
|
||||||
});
|
});
|
||||||
});
|
});
|
Loading…
Reference in New Issue