ref: 62752cfee93160a684da00627405c74a08c3344f
parent: 4d708f096d5df64bf7309cbed67564d98c8e815a
author: bep <[email protected]>
date: Wed Feb 18 17:16:40 EST 2015
Return unmodified content if panic in LiveReloadInject
--- a/transform/livereloadinject.go
+++ b/transform/livereloadinject.go
@@ -6,10 +6,11 @@
"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>")