Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tpl
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-07-21 18:03:06 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-07-22 11:13:30 +0300
commiteded9ac2a05b9a7244c25c70ca8f761b69b33385 (patch)
tree34da39c5ab42d9ca6e62c57297f31c237f5aee90 /tpl
parent8d72512825b4cee12dc1952004f48fd076a3517b (diff)
resources/js: Simplify options handling
Mostly to minify cache hash breakage. Updates #7499
Diffstat (limited to 'tpl')
-rw-r--r--tpl/js/js.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/tpl/js/js.go b/tpl/js/js.go
index 2232d8be7..b7a2fe066 100644
--- a/tpl/js/js.go
+++ b/tpl/js/js.go
@@ -16,7 +16,6 @@ package js
import (
"github.com/gohugoio/hugo/deps"
- "github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/resources"
"github.com/gohugoio/hugo/resources/resource"
"github.com/gohugoio/hugo/resources/resource_transformers/js"
@@ -58,16 +57,10 @@ func (ns *Namespace) Build(args ...interface{}) (resource.Resource, error) {
}
}
- var options js.Options
if targetPath != "" {
- options.TargetPath = helpers.ToSlashTrimLeading(targetPath)
- } else if m != nil {
- options, err = js.DecodeOptions(m)
- if err != nil {
- return nil, err
- }
+ m = map[string]interface{}{"targetPath": targetPath}
}
- return ns.client.Process(r, options)
+ return ns.client.Process(r, m)
}