aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/js
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-07-13 11:01:38 +0200
committerBjørn Erik Pedersen <[email protected]>2020-07-13 11:01:38 +0200
commit25e3da3343b5cd4bbcd11fa76b382fb089971840 (patch)
tree6e823fc06542f790f364a78225a46a9adc073d40 /tpl/js
parent9df98ec49ca9fa326125ccfee626b6e46c6ab14b (diff)
downloadhugo-25e3da3343b5cd4bbcd11fa76b382fb089971840.tar.gz
hugo-25e3da3343b5cd4bbcd11fa76b382fb089971840.zip
docs: Regenerate docs helper
Diffstat (limited to 'tpl/js')
-rw-r--r--tpl/js/js.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/tpl/js/js.go b/tpl/js/js.go
index 4dc97a707..2232d8be7 100644
--- a/tpl/js/js.go
+++ b/tpl/js/js.go
@@ -25,6 +25,9 @@ import (
// New returns a new instance of the js-namespaced template functions.
func New(deps *deps.Deps) *Namespace {
+ if deps.ResourceSpec == nil {
+ return &Namespace{}
+ }
return &Namespace{
client: js.New(deps.BaseFs.Assets, deps.ResourceSpec),
}