import inflection from 'inflection';

export default (label, source) => typeof label !== 'undefined' ? label : inflection.humanize(source); // eslint-disable-line no-confusing-arrow

import inflection from 'inflection';

export default (label, source) => {
    if (typeof label !== 'undefined') return label;
    if (typeof source !== 'undefined') return inflection.humanize(source);
    return '';
};

Fix warning for fields with no source and no label
Fix warning for fields with no source and no label
