Skip to content

Commit

Permalink
Fix warnings of StyleInspector
Browse files Browse the repository at this point in the history
Summary:
Fix issue #5831
Closes #5832

Reviewed By: svcscm

Differential Revision: D2917760

Pulled By: vjeux

fb-gh-sync-id: 3808d14075b259dd21056a7111205edae1e3eb48
shipit-source-id: 3808d14075b259dd21056a7111205edae1e3eb48
  • Loading branch information
wusuopu authored and facebook-github-bot-0 committed Feb 10, 2016
1 parent 1978805 commit 97741af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libraries/Inspector/StyleInspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ class StyleInspector extends React.Component {
return (
<View style={styles.container}>
<View>
{names.map(name => <Text style={styles.attr}>{name}:</Text>)}
{names.map(name => <Text key={name} style={styles.attr}>{name}:</Text>)}
</View>

<View>
{names.map(name => {
var value = typeof this.props.style[name] === 'object' ? JSON.stringify(this.props.style[name]) : this.props.style[name];
return <Text style={styles.value}>{value}</Text>;
return <Text key={name} style={styles.value}>{value}</Text>;
} ) }
</View>
</View>
Expand Down

0 comments on commit 97741af

Please sign in to comment.