mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
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:
@@ -1269,7 +1269,7 @@ func TestIndexPageSimpleMethods(t *testing.T) {
|
||||
{func(n *Page) bool { return n.Now().Unix() == time.Now().Unix() }},
|
||||
} {
|
||||
|
||||
n := &Page{Kind: KindHome}
|
||||
n := &Page{pageInit: &pageInit{}, Kind: KindHome}
|
||||
n.RSSLink = "rssLink"
|
||||
|
||||
if !this.assertFunc(n) {
|
||||
|
Reference in New Issue
Block a user