File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
packages/react-devtools-shared/src Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -439,12 +439,13 @@ export function getDataType(data: Object): DataType {
439439 return 'iterator' ;
440440 } else if (data.constructor && data . constructor . name === 'RegExp ') {
441441 return 'regexp' ;
442- } else if (Object.prototype.toString.call(data) === '[object Date]') {
443- return 'date' ;
444- } else if (
445- Object.prototype.toString.call(data) === '[object HTMLAllCollection]'
446- ) {
447- return 'html_all_collection' ;
442+ } else {
443+ const toStringValue = Object . prototype . toString . call ( data ) ;
444+ if ( toStringValue === '[object Date]' ) {
445+ return 'date' ;
446+ } else if ( toStringValue === '[object HTMLAllCollection]' ) {
447+ return 'html_all_collection' ;
448+ }
448449 }
449450 return 'object';
450451 case 'string':
You can’t perform that action at this time.
0 commit comments