Skip to content

Commit

Permalink
Be smart about not existing metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael committed Jun 28, 2012
1 parent 89f58ae commit 3ec12f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _includes/views/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ views.Post = Backbone.View.extend({
render: function() {
var that = this;
$(this.el).html(templates.post(_.extend(this.model, { mode: this.mode })));
if (this.model.metadata.published) $(this.el).addClass('published');
if (this.model.metadata && this.model.metadata.published) $(this.el).addClass('published');
this.initEditor();
return this;
}
Expand Down

0 comments on commit 3ec12f4

Please sign in to comment.