diff options
author | bep <[email protected]> | 2015-02-18 22:16:40 +0100 |
---|---|---|
committer | bep <[email protected]> | 2015-02-18 22:16:40 +0100 |
commit | 62752cfee93160a684da00627405c74a08c3344f (patch) | |
tree | 346da1af90e1bc6161fb317b46a7c7cfe011e5ac /transform | |
parent | 4d708f096d5df64bf7309cbed67564d98c8e815a (diff) | |
download | hugo-62752cfee93160a684da00627405c74a08c3344f.tar.gz hugo-62752cfee93160a684da00627405c74a08c3344f.zip |
Return unmodified content if panic in LiveReloadInject
Diffstat (limited to 'transform')
-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>") |