fix isSharedCollection
This commit is contained in:
parent
801ff1a856
commit
ae881e6a4f
|
@ -66,8 +66,12 @@ export function isSharedCollection(
|
||||||
collectionID: number
|
collectionID: number
|
||||||
) {
|
) {
|
||||||
const user: User = getData(LS_KEYS.USER);
|
const user: User = getData(LS_KEYS.USER);
|
||||||
return (
|
|
||||||
collections.find((collection) => collection.id === collectionID)?.owner
|
const collection = collections.find(
|
||||||
.id !== user.id
|
(collection) => collection.id === collectionID
|
||||||
);
|
);
|
||||||
|
if (!collection) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return collection?.owner.id !== user.id;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue