File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
packages/react-devtools-shared/src Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -406,10 +406,6 @@ export function getDataType(data: Object): DataType {
406406 return 'html_element' ;
407407 }
408408
409- if (Object.prototype.toString.call(data) === '[object HTMLAllCollection]') {
410- return 'html_all_collection' ;
411- }
412-
413409 const type = typeof data;
414410 switch (type) {
415411 case 'bigint' :
@@ -445,12 +441,23 @@ export function getDataType(data: Object): DataType {
445441 return 'regexp' ;
446442 } else if (Object.prototype.toString.call(data) === '[object Date]') {
447443 return 'date' ;
444+ } else if (
445+ Object.prototype.toString.call(data) === '[object HTMLAllCollection]'
446+ ) {
447+ return 'html_all_collection' ;
448448 }
449449 return 'object';
450450 case 'string':
451451 return 'string';
452452 case 'symbol':
453453 return 'symbol';
454+ case 'undefined':
455+ if (
456+ Object.prototype.toString.call(data) === '[object HTMLAllCollection]'
457+ ) {
458+ return 'html_all_collection' ;
459+ }
460+ return 'undefined';
454461 default:
455462 return 'unknown';
456463 }
You can’t perform that action at this time.
0 commit comments