diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2015-02-18 22:16:40 +0100 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-02-18 22:16:40 +0100 |
commit | 62752cfee93160a684da00627405c74a08c3344f (patch) | |
tree | 346da1af90e1bc6161fb317b46a7c7cfe011e5ac | |
parent | 4d708f096d5df64bf7309cbed67564d98c8e815a (diff) |
Return unmodified content if panic in LiveReloadInject
-rw-r--r-- | transform/livereloadinject.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/transform/livereloadinject.go b/transform/livereloadinject.go index 4f572b57c..eb431f14a 100644 --- a/transform/livereloadinject.go +++ b/transform/livereloadinject.go @@ -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>") |