Skip to content

Commit

Permalink
feat: Use fromEntries to convert Map to object
Browse files Browse the repository at this point in the history
  • Loading branch information
Azurewarth0920 committed Feb 3, 2024
1 parent 61d03a8 commit eedc8fc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/devtools-kit/src/core/component/state/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ export function getBigIntDetails(val: bigint | bigint) {
}

export function getMapDetails(val: Map<string, unknown>) {
const list: Record<string, unknown> = {}
val.forEach(
(value, key) => {
list[key] = value
},
)
const list: Record<string, unknown> = Object.fromEntries(val)
return {
_custom: {
type: 'map',
Expand Down

0 comments on commit eedc8fc

Please sign in to comment.