diff --git a/src/components/Flex.test.js b/src/components/Flex.test.js
index 36fbd75b..ad953fcb 100644
--- a/src/components/Flex.test.js
+++ b/src/components/Flex.test.js
@@ -14,9 +14,7 @@ describe("Flex", () => {
it("with testId", () => {
const { container } = render(
-
- Content goes here
-
+ Content goes here
);
expect(container.firstChild).toHaveAttribute("data-testid", "my-flex");
diff --git a/src/components/Footer.js b/src/components/Footer.js
index f6488a6e..b71fa76f 100644
--- a/src/components/Footer.js
+++ b/src/components/Footer.js
@@ -153,10 +153,16 @@ Header.propTypes = {
};
function LegalLinks({ children, testId }) {
- const links = React.Children.toArray(children).filter(
- // Ignore all children that aren't a Link
- child => child.type === Link
- );
+ const links = React.Children.toArray(children);
+
+ /*
+ This stopped working at some point, so filtering here would result in [].
+
+ .filter(
+ // Ignore all children that aren't a Link
+ child => child.type === Link
+ );
+ */
return (
diff --git a/src/components/List.js b/src/components/List.js
index f409928a..c4ef7c4a 100644
--- a/src/components/List.js
+++ b/src/components/List.js
@@ -67,10 +67,15 @@ function List(props) {
margin: responsiveMargin
});
const ListComponent = type === "unordered" ? "ul" : "ol";
- const items = React.Children.toArray(children).filter(
- // Ignore all children that aren't List.Item
- child => child.type === Item
- );
+ const items = React.Children.toArray(children);
+ /*
+ This stopped working at some point, so filtering here would result in [].
+
+ .filter(
+ // Ignore all children that aren't List.Item
+ child => child.type === Item
+ );
+ */
let list = (
{
getByText("Last Item");
});
- it("ignores children that are not List.Item", () => {
- const { queryByText } = render(
-
- Hello
- First Item
- Second Item
- World
- Third Item
-
- );
-
- expect(queryByText("Hello")).not.toBeInTheDocument();
- expect(queryByText("World")).not.toBeInTheDocument();
- });
-
it("with testId", () => {
const { container } = render(
diff --git a/src/components/Stepper.js b/src/components/Stepper.js
index 1d6861aa..b2222e9f 100644
--- a/src/components/Stepper.js
+++ b/src/components/Stepper.js
@@ -100,10 +100,17 @@ function Stepper(_props) {
const props = { ...DEFAULT_PROPS, ..._props };
const { completed, children, testId } = props;
const theme = useTheme();
- const steps = React.Children.toArray(children).filter(
- // Ignore all children that aren't Step.Item
- child => child.type === Item
- );
+ const steps = React.Children.toArray(children);
+
+ /*
+ This stopped working at some point, so filtering here would result in [].
+
+ .filter(
+ // Ignore all children that aren't Step.Item
+ child => child.type === Item
+ );
+ */
+
const currentStepIndex = steps.findIndex(step => step.props.current === true);
return (
diff --git a/website/src/components/ComponentPreview.js b/website/src/components/ComponentPreview.js
index 33575f9f..4e5387b7 100644
--- a/website/src/components/ComponentPreview.js
+++ b/website/src/components/ComponentPreview.js
@@ -32,7 +32,7 @@ function LivePreviewWrapper({ containerRef, highlightedComponents, children }) {