Skip to content

Commit

Permalink
Add html_all_collection type to correct typeof document.all
Browse files Browse the repository at this point in the history
  • Loading branch information
omarsy committed Aug 14, 2020
1 parent 2704bb5 commit c560e93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/react-devtools-shared/src/hydration.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export function dehydrate(
),
);

case 'html_all_collection':
case 'typed_array':
case 'iterator':
isPathAllowedCheck = isPathAllowed(path);
Expand Down
4 changes: 4 additions & 0 deletions packages/react-devtools-shared/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ export type DataType =
| 'data_view'
| 'date'
| 'function'
| 'html_all_collection'
| 'html_element'
| 'infinity'
| 'iterator'
Expand Down Expand Up @@ -447,6 +448,9 @@ export function getDataType(data: Object): DataType {
case 'symbol':
return 'symbol';
default:
if (data instanceof HTMLAllCollection) {
return 'html_all_collection';
}
return 'unknown';
}
}
Expand Down

0 comments on commit c560e93

Please sign in to comment.