Browse Source

set _id on loadPost

pull/1/head
wes 8 years ago
parent
commit
0708622729
  1. 2
      src/scripts/editor.tag

2
src/scripts/editor.tag

@ -92,7 +92,6 @@ this.defaultPost = {
var self = this; var self = this;
currentPost() { currentPost() {
return Z.focus(self.currentPosts, self.defaultPost); return Z.focus(self.currentPosts, self.defaultPost);
} }
@ -216,6 +215,7 @@ loadPost(_id) {
self.refs.textarea.value = resp.data.content; self.refs.textarea.value = resp.data.content;
self.refs.title.value = resp.data.title; self.refs.title.value = resp.data.title;
self.refs.author.value = resp.data.author; self.refs.author.value = resp.data.author;
self._id = resp.data._id;
self.focused = true; self.focused = true;
self.isNewPost = false; self.isNewPost = false;

Loading…
Cancel
Save