Skip to content

Commit

Permalink
Bad noticeboard newsfeed item breaks page
Browse files Browse the repository at this point in the history
  • Loading branch information
edwh committed Apr 15, 2019
1 parent e209874 commit 4dd3e3a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions http/js/iznik/views/pages/user/newsfeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -1315,9 +1315,14 @@ define([
self.template = 'user_newsfeed_aboutme'
break
case 'Noticeboard':
self.template = 'user_newsfeed_noticeboard'
var info = JSON.parse(self.model.get('message'));
self.model.set('info', info);
try {
self.template = 'user_newsfeed_noticeboard'
var info = JSON.parse(self.model.get('message'));
self.model.set('info', info);
} catch (e) {
console.error("Newsfeed parse failed", e.message, self.model.attributes)
self.template = null
}
break
}

Expand Down

0 comments on commit 4dd3e3a

Please sign in to comment.