Skip to content

Commit f8d552e

Browse files
Serafim BarrocaSerafim Barroca
Serafim Barroca
authored and
Serafim Barroca
committed
Check for TypeArray instead of ArrayBuffer
1 parent 32a8e8f commit f8d552e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/color/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
var tinycolor = require('tinycolor2');
44
var isNumeric = require('fast-isnumeric');
5+
var isTypedArray = require('../../lib/array').isTypedArray;
56

67
var color = module.exports = {};
78

@@ -116,7 +117,7 @@ color.clean = function(container) {
116117
if(!Array.isArray(el0) && el0 && typeof el0 === 'object') {
117118
for(j = 0; j < val.length; j++) color.clean(val[j]);
118119
}
119-
} else if(val && typeof val === 'object' && !ArrayBuffer.isView(val)) color.clean(val);
120+
} else if(val && typeof val === 'object' && !isTypedArray(val)) color.clean(val);
120121
}
121122
};
122123

0 commit comments

Comments
 (0)