File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ export async function traversePathAsync<T extends object>(
9191 let parent = obj ;
9292
9393 while ( path . length < realPath . length ) {
94- const key = path . at ( - 1 ) as keyof typeof parent ;
94+ const key = path [ path . length - 1 ] as keyof typeof parent ;
9595
9696 const value = modifier
9797 ? await modifier ( {
@@ -110,7 +110,7 @@ export async function traversePathAsync<T extends object>(
110110 path . push ( realPath [ path . length ] ) ;
111111 }
112112
113- const key = realPath . at ( - 1 ) ;
113+ const key = realPath [ realPath . length - 1 ] ;
114114
115115 return {
116116 parent,
@@ -145,7 +145,7 @@ export function traversePath<T extends object>(
145145 let parent = obj ;
146146
147147 while ( path . length < realPath . length ) {
148- const key = path . at ( - 1 ) as keyof typeof parent ;
148+ const key = path [ path . length - 1 ] as keyof typeof parent ;
149149
150150 const value = modifier
151151 ? modifier ( {
@@ -164,7 +164,7 @@ export function traversePath<T extends object>(
164164 path . push ( realPath [ path . length ] ) ;
165165 }
166166
167- const key = realPath . at ( - 1 ) ;
167+ const key = realPath [ realPath . length - 1 ] ;
168168 return {
169169 parent,
170170 key : String ( key ) ,
You can’t perform that action at this time.
0 commit comments