mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 08:57:03 +03:00
Bugfix: when Nextcloud calendar is cancelled, don't try to save #569
This commit is contained in:
parent
63d693f21b
commit
a1cafb1d0c
1 changed files with 10 additions and 9 deletions
|
|
@ -70,7 +70,7 @@
|
||||||
view.nextcloudSaveICS = () => {
|
view.nextcloudSaveICS = () => {
|
||||||
let attachment = view.nextcloudICS();
|
let attachment = view.nextcloudICS();
|
||||||
attachment && rl.nextcloud.selectCalendar().then(href => {
|
attachment && rl.nextcloud.selectCalendar().then(href => {
|
||||||
console.dir({href: href});
|
if (href) {
|
||||||
fetch(attachment.linkDownload(), {
|
fetch(attachment.linkDownload(), {
|
||||||
mode: 'same-origin',
|
mode: 'same-origin',
|
||||||
cache: 'no-cache',
|
cache: 'no-cache',
|
||||||
|
|
@ -79,6 +79,7 @@
|
||||||
})
|
})
|
||||||
.then(response => (response.status < 400) ? response.text() : Promise.reject(new Error({ response })))
|
.then(response => (response.status < 400) ? response.text() : Promise.reject(new Error({ response })))
|
||||||
.then(text => rl.nextcloud.calendarPut(href, text));
|
.then(text => rl.nextcloud.calendarPut(href, text));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue