@@ -77,12 +77,14 @@ export default (
77
77
78
78
const leaves = computed ( ( ) => getLeaves ( { value } ) ) ;
79
79
80
- const atlas = computed (
81
- ( ) => new Map ( leaves . value . map ( ( leaf ) => [ leaf [ keyId ] as string , leaf ] ) ) ,
80
+ const atlas = computed ( ( ) =>
81
+ Object . fromEntries (
82
+ leaves . value . map ( ( leaf ) => [ leaf [ keyId ] as string , leaf ] ) ,
83
+ ) ,
82
84
) ;
83
85
84
86
const add = ( pId : string ) => {
85
- const the = atlas . value . get ( pId ) ;
87
+ const the = atlas . value [ pId ] ;
86
88
if ( the ) {
87
89
const children = the [ keyChildren ] as
88
90
| Record < string , unknown > [ ]
@@ -106,7 +108,7 @@ export default (
106
108
return undefined ;
107
109
} ,
108
110
down = ( pId : string ) => {
109
- const the = atlas . value . get ( pId ) ;
111
+ const the = atlas . value [ pId ] ;
110
112
if ( the ) {
111
113
const index = the [ keyIndex ] as number ,
112
114
nextIndex = index + 1 ,
@@ -123,7 +125,7 @@ export default (
123
125
}
124
126
} ,
125
127
left = ( pId : string ) => {
126
- const the = atlas . value . get ( pId ) ;
128
+ const the = atlas . value [ pId ] ;
127
129
if ( the ) {
128
130
const parent = the [ keyParent ] as Record < string , unknown > | undefined ;
129
131
if ( parent ?. [ keyParent ] ) {
@@ -143,7 +145,7 @@ export default (
143
145
return undefined ;
144
146
} ,
145
147
remove = ( pId : string ) => {
146
- const the = atlas . value . get ( pId ) ;
148
+ const the = atlas . value [ pId ] ;
147
149
if ( the ) {
148
150
const parent = the [ keyParent ] as Record < string , unknown > | undefined ;
149
151
if ( parent ) {
@@ -162,7 +164,7 @@ export default (
162
164
return undefined ;
163
165
} ,
164
166
right = ( pId : string ) => {
165
- const the = atlas . value . get ( pId ) ;
167
+ const the = atlas . value [ pId ] ;
166
168
if ( the ) {
167
169
const prev = the [ keyPrev ] as Record < string , unknown > | undefined ;
168
170
if ( prev ) {
@@ -182,7 +184,7 @@ export default (
182
184
return undefined ;
183
185
} ,
184
186
up = ( pId : string ) => {
185
- const the = atlas . value . get ( pId ) ;
187
+ const the = atlas . value [ pId ] ;
186
188
if ( the ) {
187
189
const index = the [ keyIndex ] as number ,
188
190
prevIndex = index - 1 ,
0 commit comments