Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/models/social-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ export default ModelBase.extend({
event: belongsTo('event'),

normalizedName: computed('name', function() {
return this.name.trim().toLowerCase();
// Even though name is required for social links and is non-nullable
// and non-null name is being sent from API, for some reason, for certain events,
// this throws an error, so we check first if name exists
// https://github.com/fossasia/open-event-frontend/issues/4777
return this.name && this.name.trim().toLowerCase();
}),

isTwitter: equal('normalizedName', 'twitter'),
Expand Down