Skip to content

Commit e3c81b0

Browse files
committed
Merge branch 'master' of https://github.com/DMPRoadmap/roadmap
2 parents 986d532 + 66acec7 commit e3c81b0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/controllers/api/v1/plans_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def contributor_to_user(contributor:)
141141
return user if user.present?
142142

143143
# If the user was not found, invite them and attach any know identifiers
144-
names = contributor.name.split
144+
names = contributor.name&.split || [""]
145145
firstname = names.length > 1 ? names.first : nil
146146
surname = names.length > 1 ? names.last : names.first
147147
user = User.invite!({ email: contributor.email,

0 commit comments

Comments
 (0)