mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix: nextcloud plugin Uncaught (in promise) TypeError: files.forEach
This commit is contained in:
parent
62a14a3ab0
commit
c7833d622a
1 changed files with 3 additions and 4 deletions
|
|
@ -6,10 +6,9 @@
|
||||||
let view = e.detail;
|
let view = e.detail;
|
||||||
view.nextcloudAttach = () => {
|
view.nextcloudAttach = () => {
|
||||||
rl.ncFiles.selectFiles().then(files => {
|
rl.ncFiles.selectFiles().then(files => {
|
||||||
files.forEach(file => {
|
files && files.forEach(file => {
|
||||||
let id = Jua?.randomId() || file.etag,
|
let attachment = view.addAttachmentHelper(
|
||||||
attachment = view.addAttachmentHelper(
|
Jua?.randomId(),
|
||||||
id.etag,
|
|
||||||
file.name.replace(/^.*\/([^/]+)$/, '$1'),
|
file.name.replace(/^.*\/([^/]+)$/, '$1'),
|
||||||
file.size
|
file.size
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue