mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-23 18:02:28 +00:00
Return unmodified content if panic in LiveReloadInject
This commit is contained in:
parent
4d708f096d
commit
62752cfee9
1 changed files with 2 additions and 1 deletions
|
@ -6,10 +6,11 @@ import (
|
|||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func LiveReloadInject(content []byte) []byte {
|
||||
func LiveReloadInject(content []byte) (injected []byte) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
jww.ERROR.Println("Recovered in LiveReloadInject", r)
|
||||
injected = content
|
||||
}
|
||||
}()
|
||||
match := []byte("</body>")
|
||||
|
|
Loading…
Reference in a new issue