Skip to content

Commit

Permalink
return the result as it if there is no transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
alash3al committed Jan 9, 2019
1 parent 30b6d96 commit 1e69ebb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions macro.go
Expand Up @@ -144,6 +144,9 @@ func (m *Macro) scanSQLRow(rows *sqlx.Rows) (map[string]interface{}, error) {


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


vm.Set("$result", data) vm.Set("$result", data)
Expand Down

0 comments on commit 1e69ebb

Please sign in to comment.