Set status and mode of a story to default values in case of no user input

This commit is contained in:
Tobi Schäfer 2008-05-10 11:23:30 +00:00
parent 6b00ab1fc7
commit c0534cfbb4

View file

@ -187,8 +187,8 @@ Story.prototype.update = function(data) {
var delta = this.getDelta(data);
this.title = data.title ? data.title.trim() : String.EMPTY;
this.text = data.text ? data.text.trim() : String.EMPTY;
this.status = data.status;
this.mode = data.mode;
this.status = data.status || Story.PUBLIC;
this.mode = data.mode || Story.FEATURED;
this.commentMode = data.commentMode;
this.setMetadata(data);