Skip to content

Commit c560e93

Browse files
committed
Add html_all_collection type to correct typeof document.all
1 parent 2704bb5 commit c560e93

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

packages/react-devtools-shared/src/hydration.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ export function dehydrate(
219219
),
220220
);
221221

222+
case 'html_all_collection':
222223
case 'typed_array':
223224
case 'iterator':
224225
isPathAllowedCheck = isPathAllowed(path);

packages/react-devtools-shared/src/utils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ export type DataType =
372372
| 'data_view'
373373
| 'date'
374374
| 'function'
375+
| 'html_all_collection'
375376
| 'html_element'
376377
| 'infinity'
377378
| 'iterator'
@@ -447,6 +448,9 @@ export function getDataType(data: Object): DataType {
447448
case 'symbol':
448449
return 'symbol';
449450
default:
451+
if (data instanceof HTMLAllCollection) {
452+
return 'html_all_collection';
453+
}
450454
return 'unknown';
451455
}
452456
}

0 commit comments

Comments
 (0)