Set status and mode of a story to default values in case of no user input
This commit is contained in:
parent
6b00ab1fc7
commit
c0534cfbb4
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue