<commit_before>import React from 'react';
import styles from './styles';
import FontAwesome from 'react-fontawesome';
import { ContextPropagator, CallToAction } from '../../';

function renderItems(s, items) {
  return items.map((item, index) => {
    return (
      <div style={ s.itemContainer }>
        <div style={ s.item } key={ index }>
          { item.icon ? <FontAwesome name={ item.icon } style={ s.itemIcon } /> : null }
          { item.image ? <img src={ item.image } style={ s.itemImage } /> : null }
          <p style={ s.itemText }>{ item.text }</p>
        </div>
      </div>
    );
  });
}<commit_msg>Don't throw error if items is empty<commit_after>import React from 'react';
import styles from './styles';
import FontAwesome from 'react-fontawesome';
import { ContextPropagator, CallToAction } from '../../';

function renderItems(s, items) {

  if (!items) return null;

  return items.map((item, index) => {
    return (
      <div style={ s.itemContainer }>
        <div style={ s.item } key={ index }>
          { item.icon ? <FontAwesome name={ item.icon } style={ s.itemIcon } /> : null }
          { item.image ? <img src={ item.image } style={ s.itemImage } /> : null }
          <p style={ s.itemText }>{ item.text }</p>
        </div>
      </div>
    );
  });
  
}
{'fraction_non_alphanumeric': 0.174884437596302, 'fraction_numerical': 0.0, 'mean_word_length': 2.529891304347826, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 0, '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': '4726732', 'n_tokens_mistral': 416, 'n_tokens_neox': 409, 'n_words': 114}