node to page: Fix the Page copy()

By embeding the init sync.Once var in a pointer so we can reset it when we copy the page.

Updates #2297
This commit is contained in:
Bjørn Erik Pedersen
2016-11-16 20:32:38 +01:00
parent 62e9e7e6ba
commit 99d11386a7
6 changed files with 32 additions and 30 deletions

View File

@@ -66,7 +66,8 @@ func TestPermalink(t *testing.T) {
info := newSiteInfo(siteBuilderCfg{baseURL: string(test.base), language: helpers.NewDefaultLanguage()})
p := &Page{
Kind: KindPage,
pageInit: &pageInit{},
Kind: KindPage,
URLPath: URLPath{
Section: "z",
URL: test.url,