<commit_before>/* @flow */
// Fe was heavily inspired by glam, both the code as well as the name
// https://github.com/threepointone/glam/blob/master/packages/glam/src/index.js#L83
export default function feFactory(
  createElement: Function,
  FelaComponent: Function
) {
  return function fe(type: any, props: Object = {}, ...children: any) {
    const { css, className, ...otherProps } = props

    if (css) {
      return createElement(
        FelaComponent,
        {
          style: css,
        },
        renderProps =>
          createElement(
            type,
            {
              ...otherProps,
              className: className
                ? className + ' ' + renderProps.className
                : renderProps.className,
            },
            ...children
          )
      )
    }

    return createElement(type, props, ...children)
  }
}<commit_msg>#640 avoid crashing on null props closes #640<commit_after>/* @flow */
// Fe was heavily inspired by glam, both the code as well as the name
// https://github.com/threepointone/glam/blob/master/packages/glam/src/index.js#L83
export default function feFactory(
  createElement: Function,
  FelaComponent: Function
) {
  return function fe(type: any, props: Object = {}, ...children: any) {
    if (props) {
      const { css, className, ...otherProps } = nonNullProps

      if (css) {
        return createElement(
          FelaComponent,
          {
            style: css,
          },
          renderProps =>
            createElement(
              type,
              {
                ...otherProps,
                className: className
                  ? className + ' ' + renderProps.className
                  : renderProps.className,
              },
              ...children
            )
        )
      }
    }

    return createElement(type, props, ...children)
  }
}
{'fraction_non_alphanumeric': 0.11122994652406418, 'fraction_numerical': 0.0053475935828877, 'mean_word_length': 1.605849582172702, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6599429', 'n_tokens_mistral': 512, 'n_tokens_neox': 486, 'n_words': 127}