diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-07-13 11:01:38 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-07-13 11:01:38 +0200 |
commit | 25e3da3343b5cd4bbcd11fa76b382fb089971840 (patch) | |
tree | 6e823fc06542f790f364a78225a46a9adc073d40 /tpl/js | |
parent | 9df98ec49ca9fa326125ccfee626b6e46c6ab14b (diff) | |
download | hugo-25e3da3343b5cd4bbcd11fa76b382fb089971840.tar.gz hugo-25e3da3343b5cd4bbcd11fa76b382fb089971840.zip |
docs: Regenerate docs helper
Diffstat (limited to 'tpl/js')
-rw-r--r-- | tpl/js/js.go | 3 |
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), } |