From 7ccae9643898c37b47bc36cc34b8dfd3088af9f3 Mon Sep 17 00:00:00 2001 From: wes Date: Mon, 28 Aug 2017 17:44:57 -0400 Subject: [PATCH] try not to route twice --- src/scripts/post.tag | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scripts/post.tag b/src/scripts/post.tag index edfbadb..e9d9721 100644 --- a/src/scripts/post.tag +++ b/src/scripts/post.tag @@ -117,6 +117,10 @@ updatePost(postcontent) { self.content = postcontent.content; self.title = postcontent.title; + if (self.opts.state._id !== self._id) { + self.route(`/posts/${self._id}`); + } + self.opts.state._id = self._id; self.opts.state.title = self.title; self.opts.state.initial = self.content;