check if answerType is set when saving a poll to prevent running in an error
This commit is contained in:
parent
6353f16182
commit
cbe4a00532
1 changed files with 5 additions and 0 deletions
|
@ -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){
|
||||
|
|
Loading…
Reference in a new issue