mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-22 09:36:43 +03:00
This commit is contained in:
parent
7ad9616777
commit
696b3bbc7f
|
@ -73,7 +73,7 @@ export default class JSONArrayNode extends React.Component {
|
|||
// caching it if it hasn't been created yet.
|
||||
getItemString() {
|
||||
if (!this.itemString) {
|
||||
this.itemString = this.props.data.length + ' item' + (this.props.data.length > 1 ? 's' : '');
|
||||
this.itemString = this.props.data.length + ' item' + (this.props.data.length !== 0 ? 's' : '');
|
||||
}
|
||||
return this.itemString;
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ export default class JSONObjectNode extends React.Component {
|
|||
getItemString() {
|
||||
if (!this.itemString) {
|
||||
const len = Object.keys(this.props.data).length;
|
||||
this.itemString = len + ' key' + (len > 1 ? 's' : '');
|
||||
this.itemString = len + ' key' + (len !== 0 ? 's' : '');
|
||||
}
|
||||
return this.itemString;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user