Browse Source

more bug fixing

pull/1/head
wes 7 years ago
parent
commit
f8f50113da
  1. 5
      src/scripts/app.tag
  2. 1
      src/scripts/browse.tag
  3. 2
      src/scripts/post.tag

5
src/scripts/app.tag

@ -201,10 +201,7 @@ to(name) {
this.menuOff(e);
}
console.log("routing to " + name);
if (name == "posts") {
this.route(`${name}/${self.state._id}`);
}
else {
if (name != "posts") {
this.route(name);
}
return;

1
src/scripts/browse.tag

@ -55,6 +55,7 @@ self.converter = new showdown.Converter();
self.openPost = (id) => {
return ((ev) => {
self.route(`/posts/${id}`);
RiotControl.trigger("openpost", id);
});
};

2
src/scripts/post.tag

@ -117,7 +117,7 @@ updatePost(postcontent) {
self.content = postcontent.content;
self.title = postcontent.title;
if (self.opts.state._id !== self._id) {
if (window.location.pathname !== `/blog/posts/${self._id}`) {
self.route(`/posts/${self._id}`);
}

Loading…
Cancel
Save