diff --git a/web/src/components/AccessControl.vue b/web/src/components/AccessControl.vue index cab92f21..8ad7a8b4 100644 --- a/web/src/components/AccessControl.vue +++ b/web/src/components/AccessControl.vue @@ -25,36 +25,36 @@ function savePermissions() { }; if (userToRemove.value) { newPermissions.collaborator_ids = newPermissions.collaborator_ids.filter( - (uid: number) => uid != userToRemove.value?.id + (uid: number) => uid !== userToRemove.value?.id ); newPermissions.follower_ids = newPermissions.follower_ids.filter( - (uid: number) => uid != userToRemove.value?.id + (uid: number) => uid !== userToRemove.value?.id ); } else if ( ["transfer", "claim"].includes(userSelectDialogMode.value) && - selectedUsers.value.length == 1 + selectedUsers.value.length === 1 ) { if (!newPermissions.collaborator_ids.includes(newPermissions.owner_id)) { newPermissions.collaborator_ids.push(newPermissions.owner_id); } if (newPermissions.collaborator_ids.includes(selectedUsers.value[0].id)) { newPermissions.collaborator_ids = newPermissions.collaborator_ids.filter( - (uid: number) => uid != selectedUsers.value[0].id + (uid: number) => uid !== selectedUsers.value[0].id ); } if (newPermissions.follower_ids.includes(selectedUsers.value[0].id)) { newPermissions.follower_ids = newPermissions.follower_ids.filter( - (uid: number) => uid != selectedUsers.value[0].id + (uid: number) => uid !== selectedUsers.value[0].id ); } newPermissions.owner_id = selectedUsers.value[0].id; - } else if (selectedPermissionLevel.value == "collaborator") { + } else if (selectedPermissionLevel.value === "collaborator") { selectedUsers.value.forEach((u: User) => { if (!newPermissions.collaborator_ids.includes(u.id)) { newPermissions.collaborator_ids.push(u.id); } }); - } else if (selectedPermissionLevel.value == "follower") { + } else if (selectedPermissionLevel.value === "follower") { selectedUsers.value.forEach((u: User) => { if (!newPermissions.follower_ids.includes(u.id)) { newPermissions.follower_ids.push(u.id); @@ -114,7 +114,7 @@ onMounted(() => {