Skip to content

Commit bd4d2eb

Browse files
committed
handle typed arrays in contour
1 parent bbb2c0f commit bd4d2eb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/traces/contour/constraint_mapping.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
'use strict';
22

3+
var isArrayOrTypedArray = require('../../lib/array').isArrayOrTypedArray;
4+
var isTypedArraySpec = require('../../lib/array').isTypedArraySpec;
5+
var decodeTypedArraySpec = require('../../lib/array').decodeTypedArraySpec;
6+
37
var filterOps = require('../../constants/filter_ops');
48
var isNumeric = require('fast-isnumeric');
59

@@ -16,7 +20,8 @@ module.exports = {
1620
// This does not in any way shape or form support calendars. It's adapted from
1721
// transforms/filter.js.
1822
function coerceValue(operation, value) {
19-
var hasArrayValue = Array.isArray(value);
23+
if(isTypedArraySpec(value)) value = decodeTypedArraySpec(value);
24+
var hasArrayValue = isArrayOrTypedArray(value);
2025

2126
var coercedValue;
2227

0 commit comments

Comments
 (0)