Skip to content

Commit 61e042b

Browse files
samwalshnzSam Walsh
authored and
Sam Walsh
committed
fix(formatting): Fix JSX element in prop object recursive loop
Now supports: <Component props={{ subcomponent: <AnotherComponent />, }} />
1 parent 320aead commit 61e042b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/formatter/sortObject.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export default function sortObject(value: any): any {
2020
return Object.keys(value)
2121
.sort()
2222
.reduce((result, key) => {
23+
if (key === '_owner') {
24+
return result;
25+
}
2326
// eslint-disable-next-line no-param-reassign
2427
result[key] = sortObject(value[key]);
2528
return result;

0 commit comments

Comments
 (0)