From e222b3970a6dffccae9d6fd03fc44802b2cec641 Mon Sep 17 00:00:00 2001 From: Azareal Date: Mon, 11 May 2020 17:28:18 +1000 Subject: [PATCH] eliminate redundant string allocs in ViewTopic save bytes --- public/register.js | 2 +- routes/topic.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/register.js b/public/register.js index d362eda8..86855700 100644 --- a/public/register.js +++ b/public/register.js @@ -7,7 +7,7 @@ console.log("resp",resp); return; } - resp.text().then(dat => eval(dat)); + resp.text().then(d => eval(d)); }) .catch(e => console.log("e",e)); }); diff --git a/routes/topic.go b/routes/topic.go index 0d515e7f..7fb4f53d 100644 --- a/routes/topic.go +++ b/routes/topic.go @@ -67,7 +67,8 @@ func ViewTopic(w http.ResponseWriter, r *http.Request, user *c.User, header *c.H return c.NoPermissions(w, r, user) } header.Title = topic.Title - header.Path = c.BuildTopicURL(c.NameToSlug(topic.Title), topic.ID) + header.Path = topic.Link + //header.Path = c.BuildTopicURL(c.NameToSlug(topic.Title), topic.ID) postGroup, err := c.Groups.Get(topic.Group) if err != nil {