Skip to content

Commit 942f92f

Browse files
committed
streamtube - no need for casting typed arrays to numbers
1 parent 07ce3d2 commit 942f92f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/traces/streamtube/calc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ function distinctVals(col) {
206206
function filter(arr, len) {
207207
if(len === undefined) len = arr.length;
208208

209+
// no need for casting typed arrays to numbers
210+
if(Lib.isTypedArray(arr)) return arr.slice(0, len);
211+
209212
var values = [];
210213
for(var i = 0; i < len; i++) {
211214
values[i] = +arr[i];

0 commit comments

Comments
 (0)