File tree Expand file tree Collapse file tree 1 file changed +15
-17
lines changed
packages/react-devtools-shared/src Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -243,23 +243,21 @@ export function dehydrate(
243243 : data . constructor . name ,
244244 } ;
245245
246- if ( typeof data [ Symbol . iterator ] ) {
247- // TRICKY
248- // Don't use [...spread] syntax for this purpose.
249- // This project uses @babel /plugin-transform-spread in "loose" mode which only works with Array values.
250- // Other types (e.g. typed arrays, Sets) will not spread correctly.
251- Array. from ( data ) . forEach (
252- ( item , i ) =>
253- ( unserializableValue [ i ] = dehydrate (
254- item ,
255- cleaned ,
256- unserializable ,
257- path . concat ( [ i ] ) ,
258- isPathAllowed ,
259- isPathAllowedCheck ? 1 : level + 1 ,
260- ) ) ,
261- ) ;
262- }
246+ // TRICKY
247+ // Don't use [...spread] syntax for this purpose.
248+ // This project uses @babel /plugin-transform-spread in "loose" mode which only works with Array values.
249+ // Other types (e.g. typed arrays, Sets) will not spread correctly.
250+ Array . from ( data ) . forEach (
251+ ( item , i ) =>
252+ ( unserializableValue [ i ] = dehydrate (
253+ item ,
254+ cleaned ,
255+ unserializable ,
256+ path . concat ( [ i ] ) ,
257+ isPathAllowed ,
258+ isPathAllowedCheck ? 1 : level + 1 ,
259+ ) ) ,
260+ ) ;
263261
264262 unserializable . push ( path ) ;
265263
You can’t perform that action at this time.
0 commit comments