Skip to content

Commit

Permalink
feat: added check for invalid bio values
Browse files Browse the repository at this point in the history
  • Loading branch information
Curious-Goblin committed Jan 9, 2025
1 parent c5d0711 commit b1d17d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/meteor/server/methods/saveUserProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async function saveUserProfile(
await setUserStatusMethod(this.userId, settings.statusType as UserStatus, undefined);
}

if (user && settings.bio !== undefined) {
if (user && settings.bio !== undefined && settings.bio !== null) {
if (typeof settings.bio !== 'string') {
throw new Meteor.Error('error-invalid-field', 'bio', {
method: 'saveUserProfile',
Expand Down

0 comments on commit b1d17d2

Please sign in to comment.