Disabling Question votes causes json exception when trying to edit an answer

2.92K viewsIssueserror json question voting

I disabled votes for questions and answers. Once I did this, clicking the cog for an answer to load up the controls to edit etc stopped working. On page load I could see there was a json error. Line 261 of question.js

render: function(){
   var attr = this.$el.find('[ap-vote]').attr('ap-vote');
   this.model.set('vote', $.parseJSON(attr), {silent: true});
   return this;

Since I have voting disabled, attr was returning null annd was causing the json parse to throw an exception which in turn means that if you disable question votes, you are unable to edit answers.

Asked question