<commit_before>const classNames = require('classnames');
const React = require('react');
const PropTypes = require('prop-types');
require('./extension-chip.scss');

const ExtensionChip = props => (
    <div className={classNames('extension-chip', {'has-status': props.hasStatus})}>
        <img
            className="extension-icon"
            src={props.iconURI}
        />
        <div className="extension-content">
            <span>{props.extensionName}</span>
            {props.hasStatus && (
                <div className="extension-status">
                    Needs Connection
                </div>
            )}
        </div>
    </div>
);

ExtensionChip.propTypes = {
    extensionName: PropTypes.string,
    hasStatus: PropTypes.bool,
    iconURI: PropTypes.string
};


module.exports = ExtensionChip;<commit_msg>Don't display image in extension chip if iconURI undefined<commit_after>const classNames = require('classnames');
const React = require('react');
const PropTypes = require('prop-types');
require('./extension-chip.scss');

const ExtensionChip = props => (
    <div className={classNames('extension-chip', {'has-status': props.hasStatus})}>
        {props.iconURI &&
            <img
                className="extension-icon"
                src={props.iconURI}
            />
        }
        <div className="extension-content">
            <span>{props.extensionName}</span>
            {props.hasStatus && (
                <div className="extension-status">
                    Needs Connection
                </div>
            )}
        </div>
    </div>
);

ExtensionChip.propTypes = {
    extensionName: PropTypes.string,
    hasStatus: PropTypes.bool,
    iconURI: PropTypes.string
};


module.exports = ExtensionChip;
{'fraction_non_alphanumeric': 0.13742191936399772, 'fraction_numerical': 0.0, 'mean_word_length': 2.281191806331471, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, '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': '6871238', 'n_tokens_mistral': 469, 'n_tokens_neox': 456, 'n_words': 88}