Skip to content

Commit 3a26a40

Browse files
committed
Fix render of union in arrayOf.
1 parent 7ea2ecb commit 3a26a40

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dash/dash-renderer/src/TreeContainer.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,13 @@ class BaseTreeContainer extends Component {
225225
if (node === undefined) {
226226
return;
227227
}
228+
if (!node.length) {
229+
return assoc(frontPath, node);
230+
}
231+
const firstNode = node[0][path[1]];
232+
if (!firstNode) {
233+
return assoc(frontPath, node);
234+
}
228235
nodeValue = node.map((n, i) => ({
229236
...n,
230237
[path[1]]: isDryComponent(n[path[1]])
@@ -238,7 +245,7 @@ class BaseTreeContainer extends Component {
238245
path[1]
239246
])
240247
)
241-
: n
248+
: n[path[1]]
242249
}));
243250
path = [frontPath];
244251
} else {

0 commit comments

Comments
 (0)