tpl: Fix panic in sort of nil sequence
authorCameron Moore <moorereason@gmail.com>
Tue, 29 Mar 2016 23:54:46 +0000 (18:54 -0500)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 2 Apr 2016 21:06:48 +0000 (23:06 +0200)
commitfe929114d3f34fe1999cd3cacd7f61c0ee0c0a54
tree6fefd2b9f4a372d0c46cdd201ac367ebde8d9da8
parentd15fda500028c05fde2aa28ea53868eec01140f6
tpl: Fix panic in sort of nil sequence

Properly handle a nil sequence in the sortSeq function.  Test included.
Discovered while using `range sort .Site.Data.source.Undefined "foo"`.
tpl/template_funcs.go
tpl/template_funcs_test.go