Fix a typescript issue with catch variable type
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -174,7 +174,7 @@ export default class CreateGroup extends mixins(IdentityEditionMixin) {
|
||||
displayName: this.group.displayName(),
|
||||
}) as string
|
||||
);
|
||||
} catch (err) {
|
||||
} catch (err: any) {
|
||||
this.handleError(err);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -704,7 +704,7 @@ export default class Group extends mixins(GroupMixin) {
|
||||
},
|
||||
],
|
||||
});
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (error.graphQLErrors && error.graphQLErrors.length > 0) {
|
||||
this.$notifier.error(error.graphQLErrors[0].message);
|
||||
}
|
||||
@@ -754,7 +754,7 @@ export default class Group extends mixins(GroupMixin) {
|
||||
this.$notifier.success(
|
||||
this.$t("Group {groupTitle} reported", { groupTitle }) as string
|
||||
);
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
this.$notifier.error(
|
||||
this.$t("Error while reporting group {groupTitle}", {
|
||||
|
||||
@@ -246,7 +246,7 @@ export default class GroupFollowers extends mixins(GroupMixin) {
|
||||
username: follower.actor.preferredUsername,
|
||||
});
|
||||
this.$notifier.success(message as string);
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
if (error.graphQLErrors && error.graphQLErrors.length > 0) {
|
||||
this.$notifier.error(error.graphQLErrors[0].message);
|
||||
|
||||
@@ -335,7 +335,7 @@ export default class GroupMembers extends mixins(GroupMixin) {
|
||||
}) as string
|
||||
);
|
||||
this.newMemberUsername = "";
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
if (error.graphQLErrors && error.graphQLErrors.length > 0) {
|
||||
this.inviteError = error.graphQLErrors[0].message;
|
||||
@@ -402,7 +402,7 @@ export default class GroupMembers extends mixins(GroupMixin) {
|
||||
group: this.group.name || usernameWithDomain(this.group),
|
||||
}) as string
|
||||
);
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
if (error.graphQLErrors && error.graphQLErrors.length > 0) {
|
||||
this.$notifier.error(error.graphQLErrors[0].message);
|
||||
@@ -458,7 +458,7 @@ export default class GroupMembers extends mixins(GroupMixin) {
|
||||
successMessage = "The member role was updated to simple member";
|
||||
}
|
||||
this.$notifier.success(this.$t(successMessage) as string);
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
if (error.graphQLErrors && error.graphQLErrors.length > 0) {
|
||||
this.$notifier.error(error.graphQLErrors[0].message);
|
||||
|
||||
@@ -238,7 +238,7 @@ export default class GroupSettings extends mixins(GroupMixin) {
|
||||
variables,
|
||||
});
|
||||
this.$notifier.success(this.$t("Group settings saved") as string);
|
||||
} catch (err) {
|
||||
} catch (err: any) {
|
||||
this.handleError(err);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ export default class MyGroups extends Vue {
|
||||
},
|
||||
],
|
||||
});
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (error.graphQLErrors && error.graphQLErrors.length > 0) {
|
||||
this.$notifier.error(error.graphQLErrors[0].message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user