Skip to content

Commit 9410714

Browse files
committed
made Route nestable
1 parent e804601 commit 9410714

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/src/helperFunctions/renderChildren.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const renderChildren = (children: ChildElement[]) => {
1818
if (name === '') child.name = state.components[typeId - 1].name;
1919
// A DirectChildComponent is an instance of a top level component
2020
// This component will render IndirectChild components (div/components rendered inside a child component)
21-
// Removed style from prop drills so that styling isn't applied to canvas items.
21+
// Removed style from prop drills so that styling isn't applied to canvas items.
2222
// Also added keys & removed an unnecessary div around DirChildNestables that were causing errors.
2323
if (type === 'Component') {
2424
return (
@@ -34,7 +34,7 @@ const renderChildren = (children: ChildElement[]) => {
3434
}
3535
// ommitted orderedlists, unorderedlists, and menus, ommitted li items as non-nestable types because they can be nested within.
3636
// child is a non-nestable type of HTML element (everything except for divs and forms)
37-
else if (type === 'HTML Element' && typeId !== 11 && typeId !== 1000 && typeId !== 2 && typeId !== 3 && typeId !== 14 && typeId !== 15 && typeId !== 16 && typeId != 17) {
37+
else if (type === 'HTML Element' && typeId !== 11 && typeId !== 1000 && typeId !== 2 && typeId !== 3 && typeId !== 14 && typeId !== 15 && typeId !== 16 && typeId != 17 && typeId != -1) {
3838
return (
3939
<DirectChildHTML
4040
childId={childId}
@@ -48,8 +48,8 @@ const renderChildren = (children: ChildElement[]) => {
4848
}
4949
// Added Orderedlists, Unorderedlists, and Menus, changed lists to nestable because they are nestable.
5050
// child is a nestable type of HTML element (divs and forms)
51-
else if (type === 'HTML Element' && (typeId === 11 || typeId === 2 || typeId === 3 || typeId === 14 || typeId === 15 || typeId === 16 || typeId === 17)) {
52-
return (
51+
else if (type === 'HTML Element' && (typeId === 11 || typeId === 2 || typeId === 3 || typeId === 14 || typeId === 15 || typeId === 16 || typeId === 17 || typeId === -1)) {
52+
return (
5353
<DirectChildHTMLNestable
5454
childId={childId}
5555
type={type}

0 commit comments

Comments
 (0)