mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Server: Fixed bug when unsharing a notebook that has no recipients
This commit is contained in:
parent
f7d164be6e
commit
6ddb69e1ea
@ -131,6 +131,7 @@ export default class ShareUserModel extends BaseModel<ShareUser> {
|
||||
if (share.type !== ShareType.Folder) return;
|
||||
|
||||
const shareUsers = await this.byShareId(share.id, null);
|
||||
if (!shareUsers.length) return;
|
||||
|
||||
await this.withTransaction(async () => {
|
||||
await this.delete(shareUsers.map(s => s.id));
|
||||
|
Loading…
Reference in New Issue
Block a user