We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8309136 commit 25d3b4fCopy full SHA for 25d3b4f
src/traces/pie/helpers.js
@@ -21,15 +21,15 @@ exports.formatPieValue = function formatPieValue(v, separators) {
21
};
22
23
exports.getFirstFilled = function getFirstFilled(array, indices) {
24
- if(!Array.isArray(array)) return;
+ if(!Lib.isArrayOrTypedArray(array)) return;
25
for(var i = 0; i < indices.length; i++) {
26
var v = array[indices[i]];
27
if(v || v === 0 || v === '') return v;
28
}
29
30
31
exports.castOption = function castOption(item, indices) {
32
- if(Array.isArray(item)) return exports.getFirstFilled(item, indices);
+ if(Lib.isArrayOrTypedArray(item)) return exports.getFirstFilled(item, indices);
33
else if(item) return item;
34
35
0 commit comments