When instrumentCallExpressions is enabled, we currently instrument calls with spread arguments. This results in an error. For instance, given the following code:
which is obviously not correct, as now arr.concat() will only get the first element of the array, and $_$twiz.track will get the wrong number of arguments (unless the array only has one element).
Eventually, this can be improved by tracking each of the individual values in the array, perhaps by introducing a new $_$twiz.trackArray() method that will call $_$twiz.track() for each array element.
When
instrumentCallExpressions
is enabled, we currently instrument calls with spread arguments. This results in an error. For instance, given the following code:the result will look like:
which is obviously not correct, as now
arr.concat()
will only get the first element of the array, and$_$twiz.track
will get the wrong number of arguments (unless the array only has one element).Eventually, this can be improved by tracking each of the individual values in the array, perhaps by introducing a new
$_$twiz.trackArray()
method that will call $_$twiz.track() for each array element.