There seems to be a problem with JSX compilation

In this example, List will get different props.children value. And here are my codes:

const { AutoLayout, Text } = figma.widget;

function List(props: any) {
  console.log('List children length', props.children.length, props.children);
  return <AutoLayout name={}>{props.children}</AutoLayout>;

export function MenuUsage() {
  return (
        {[1, 2].map((number) => (
          <Text key={number}>{`${number}`}</Text>
        children={[3, 4].map((number) => (
          <Text key={number}>{`${number}`}</Text>

I hope that props.children can get a one-dimensional array, no matter how the array in children is passed in.