hugolib: Allow nil to be unwrapped as *Page
authorCameron Moore <moorereason@gmail.com>
Wed, 3 Oct 2018 02:46:32 +0000 (21:46 -0500)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 3 Oct 2018 06:33:42 +0000 (09:33 +0300)
commit498d6299581bead0f582431b8133d8b5f8760618
treecd7cdda367d5b27e9ad50b861743c9a580b36397
parent10ac2ec4466090957e1f6897906ddeb1e0b13673
hugolib: Allow nil to be unwrapped as *Page

Previously, calls to *Page.Eq(nil) would always return false because the
unwrapPage func didn't support the nil case.  Add support for unwrapping
nil to a *Page.

Fixes #5043
hugolib/site_sections.go
hugolib/site_sections_test.go