check if answerType is set when saving a poll to prevent running in an error

This commit is contained in:
jelhan 2014-05-21 19:50:19 +02:00
parent 6353f16182
commit cbe4a00532

View file

@ -372,6 +372,11 @@ App.CreateOptionsController = Ember.ObjectController.extend({
App.CreateSettingsController = Ember.ObjectController.extend({
actions: {
submit: function(){
// check if answer type is selected
if (this.get('answerType') === null) {
return;
}
// save poll
var self = this;
this.get('model').save().then(function(model){