corymsmith / react-native-icons

Quick and easy icons in React Native
MIT License
1.14k stars 141 forks source link

No | in Icon #138

Closed vanBrunneren closed 8 years ago

vanBrunneren commented 8 years ago

Hi

If I try something like this:

<Icon
     name={'fontawesome|'}
     size={30}
     color={'#FFFFFF'}
    style={styles.homeButtonIcon} />

I get the error "No icon '' in 'fontawesome' icon font"

If I try something like this:

<Icon
     name={'|street-view'}
     size={30}
     color={'#FFFFFF'}
    style={styles.homeButtonIcon} />

I get the error "No icon font named ''"

But If I try something like this

<Icon
     name={'street-view'}
     size={30}
     color={'#FFFFFF'}
    style={styles.homeButtonIcon} />

(The name without a vertical bar) There is no beautiful red box error. It's just Xcode witch fails with a ugly error.

Maybe you want to add a fix for this because I searched for this error a couple of time, when I received data from a JSON and there was no vertical bar added :wink:

ekryski commented 8 years ago

@vanBrunneren good call. A quick error check would be totally useful.

corymsmith commented 8 years ago

Just added this in 0.7.0