common/collections: Fix type checking in Append
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 11 Oct 2018 09:05:30 +0000 (11:05 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 11 Oct 2018 09:30:17 +0000 (11:30 +0200)
commit2159d77f368eb1f78e51dd94133554f88052d85f
tree8851eb048e7726aeddfbb979acaaa3613ce010af
parent821adf3ae877fdddce67afcccd751d47f4589538
common/collections: Fix type checking in Append

The fix introduced in Hugo `0.49.1` had an unintended side-effect in the `Append` func used in both `append` and `.Scratch.Add`.

This commit fixes that by loosen/fixing the type checking so concrete types can be appended to interface slices.

Fixes #5303
common/collections/append.go
common/collections/append_test.go