Skip to content

Commit

Permalink
Rename val to matched
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur22 committed Oct 7, 2024
1 parent 8fd880a commit e6d3c39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions browser/metric_event_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ func mapMetricEvent(vu moduleVU, cm *common.MetricEvent) (mapping, error) {
callback := func(pattern, url string) (bool, error) {
js := fmt.Sprintf(`_k6BrowserCheckRegEx(%s, '%s')`, pattern, url)

val, err := rt.RunString(js)
matched, err := rt.RunString(js)
if err != nil {
return false, fmt.Errorf("matching url with regex: %w", err)
}

return val.ToBoolean(), nil
return matched.ToBoolean(), nil
}

return cm.Tag(callback, urls)
Expand Down

0 comments on commit e6d3c39

Please sign in to comment.