mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-27 08:30:02 +03:00
map2tree
This commit is contained in:
parent
9bf0779f7b
commit
020cdff7d5
|
@ -45,9 +45,9 @@ export function map2tree(
|
||||||
root: unknown,
|
root: unknown,
|
||||||
options: { key?: string; pushMethod?: 'push' | 'unshift' } = {},
|
options: { key?: string; pushMethod?: 'push' | 'unshift' } = {},
|
||||||
tree: Node = { name: options.key || 'state', children: [] },
|
tree: Node = { name: options.key || 'state', children: [] },
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
): Node | {} {
|
): Node | {} {
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
if (!isPlainObject(root) && root && !(root as { toJS: () => {} }).toJS) {
|
if (!isPlainObject(root) && root && !(root as { toJS: () => {} }).toJS) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
@ -60,13 +60,13 @@ export function map2tree(
|
||||||
}
|
}
|
||||||
|
|
||||||
mapValues(
|
mapValues(
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
root && (root as { toJS: () => {} }).toJS
|
root && (root as { toJS: () => {} }).toJS
|
||||||
? // eslint-disable-next-line @typescript-eslint/ban-types
|
? // eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
(root as { toJS: () => {} }).toJS()
|
(root as { toJS: () => {} }).toJS()
|
||||||
: // eslint-disable-next-line @typescript-eslint/ban-types
|
: // eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
(root as {}),
|
(root as {}),
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
(maybeImmutable: { toJS?: () => {} }, key) => {
|
(maybeImmutable: { toJS?: () => {} }, key) => {
|
||||||
const value =
|
const value =
|
||||||
maybeImmutable && maybeImmutable.toJS
|
maybeImmutable && maybeImmutable.toJS
|
||||||
|
|
Loading…
Reference in New Issue
Block a user