From 841c2bda5583d04e43834e0f4302e194c8bbbf3f Mon Sep 17 00:00:00 2001 From: wes Date: Mon, 28 Aug 2017 18:22:56 -0400 Subject: [PATCH] make sure title in template is correct --- src/scripts/post.tag | 1 + src/templates/index.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scripts/post.tag b/src/scripts/post.tag index aaa2d28..a9c41b7 100644 --- a/src/scripts/post.tag +++ b/src/scripts/post.tag @@ -117,6 +117,7 @@ updatePost(postcontent) { self.content = postcontent.content; self.title = postcontent.title; + /* Do not route to this post if we're already on the same route */ if (window.location.pathname !== `/blog/posts/${self._id}`) { self.route(`/posts/${self._id}`); } diff --git a/src/templates/index.html b/src/templates/index.html index 82898a3..6528591 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -3,7 +3,7 @@ - {{ postcontent["title"] }} + {{ postcontent["title"] if page == "posts" else page }}