Not to call callback for sharing encrypted file, when nothing changed

This commit is contained in:
Vladislav Makhov 2020-12-14 10:26:39 +03:00
parent 4e52155bbb
commit 487ff234d9

View File

@ -134,6 +134,7 @@ class SharingPanelComponent extends React.Component {
setShareFiles(folderIds, fileIds, share, isNotifyUsers, message)
.then(() => {
if (isPrivacy) {
if (share.length === 0) return Promise.resolve();
selectedItems.forEach((item) => {
return setEncryptionAccess(item).then((encryptedFile) => {
if (!encryptedFile) return Promise.resolve();