Permalink
Browse files

return the result as it if there is no transformer

  • Loading branch information...
alash3al committed Jan 9, 2019
1 parent 30b6d96 commit 1e69ebbe538fd633723552842e66e0e4918a5ed1
Showing with 3 additions and 0 deletions.
  1. +3 −0 macro.go
@@ -144,6 +144,9 @@ func (m *Macro) scanSQLRow(rows *sqlx.Rows) (map[string]interface{}, error) {

// execTransformer - run the transformer function
func (m *Macro) execTransformer(data interface{}, transformer string) (interface{}, error) {
if transformer == "" {
return data, nil
}
vm := goja.New()

vm.Set("$result", data)

0 comments on commit 1e69ebb

Please sign in to comment.