mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-01-31 19:54:35 +03:00
Fix item strings
This commit is contained in:
parent
279480ac15
commit
78cf169aa6
|
@ -76,7 +76,7 @@ export default class JSONArrayNode extends React.Component {
|
||||||
// caching it if it hasn't been created yet.
|
// caching it if it hasn't been created yet.
|
||||||
getItemString() {
|
getItemString() {
|
||||||
if (!this.itemString) {
|
if (!this.itemString) {
|
||||||
this.itemString = this.props.data.length + ' item' + (this.props.data.length !== 0 ? 's' : '');
|
this.itemString = this.props.data.length + ' item' + (this.props.data.length !== 1 ? 's' : '');
|
||||||
}
|
}
|
||||||
return this.itemString;
|
return this.itemString;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ export default class JSONObjectNode extends React.Component {
|
||||||
getItemString() {
|
getItemString() {
|
||||||
if (!this.itemString) {
|
if (!this.itemString) {
|
||||||
const len = Object.keys(this.props.data).length;
|
const len = Object.keys(this.props.data).length;
|
||||||
this.itemString = len + ' key' + (len !== 0 ? 's' : '');
|
this.itemString = len + ' key' + (len !== 1 ? 's' : '');
|
||||||
}
|
}
|
||||||
return this.itemString;
|
return this.itemString;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user