We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 750ea7c commit 8570dc3Copy full SHA for 8570dc3
jsone.go
@@ -238,18 +238,14 @@ var operators = map[string]operator{
238
if err := restrictProperties(template, "$eval"); err != nil {
239
return nil, err
240
}
241
- value, err := render(template["$eval"], context)
242
- if err != nil {
243
- return nil, err
244
- }
245
- s, ok := value.(string)
+ s, ok := template["$eval"].(string)
246
if !ok {
247
return nil, TemplateError{
248
Message: "$eval expects a string expression",
249
Template: template,
250
251
252
- value, err = i.Execute(s, 0, context)
+ value, err := i.Execute(s, 0, context)
253
if err != nil {
254
255
Message: err.Error(),
0 commit comments