mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-22 01:26:48 +03:00
using Number.isSafeInteger for iterable size (+ fixed some comments)
This commit is contained in:
parent
11af53ccfb
commit
fff7e39874
|
@ -50,7 +50,7 @@ export default class JSONIterableNode extends React.Component {
|
|||
};
|
||||
}
|
||||
|
||||
// Returns the child nodes for each element in the array. If we have
|
||||
// Returns the child nodes for each entry in iterable. If we have
|
||||
// generated them previously, we return from cache, otherwise we create
|
||||
// them.
|
||||
getChildNodes() {
|
||||
|
@ -81,13 +81,13 @@ export default class JSONIterableNode extends React.Component {
|
|||
return this.renderedChildren;
|
||||
}
|
||||
|
||||
// Returns the "n Items" string for this node, generating and
|
||||
// Returns the "n entries" string for this node, generating and
|
||||
// caching it if it hasn't been created yet.
|
||||
getItemString() {
|
||||
if (!this.itemString) {
|
||||
const { data } = this.props;
|
||||
let count = 0;
|
||||
if (typeof data.size !== 'undefined') {
|
||||
if (Number.isSafeInteger(data.size)) {
|
||||
count = data.size;
|
||||
} else {
|
||||
for (const entry of data) { // eslint-disable-line no-unused-vars
|
||||
|
|
Loading…
Reference in New Issue
Block a user