Skip to content

Commit 25d3b4f

Browse files
committed
handle typed arrays in pie
1 parent 8309136 commit 25d3b4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/traces/pie/helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ exports.formatPieValue = function formatPieValue(v, separators) {
2121
};
2222

2323
exports.getFirstFilled = function getFirstFilled(array, indices) {
24-
if(!Array.isArray(array)) return;
24+
if(!Lib.isArrayOrTypedArray(array)) return;
2525
for(var i = 0; i < indices.length; i++) {
2626
var v = array[indices[i]];
2727
if(v || v === 0 || v === '') return v;
2828
}
2929
};
3030

3131
exports.castOption = function castOption(item, indices) {
32-
if(Array.isArray(item)) return exports.getFirstFilled(item, indices);
32+
if(Lib.isArrayOrTypedArray(item)) return exports.getFirstFilled(item, indices);
3333
else if(item) return item;
3434
};
3535

0 commit comments

Comments
 (0)