Skip to content

Commit 8757953

Browse files
committed
modified: src/index.ts
1 parent b969540 commit 8757953

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,11 @@ export default (
8080
add: (pId: string) => {
8181
const the = objLeaves[pId];
8282
if (the) {
83-
const url = URL.createObjectURL(new Blob()),
84-
[id] = url.split("/").reverse(),
85-
children = the[keyChildren] as Record<string, unknown>[] | undefined,
83+
const children = the[keyChildren] as
84+
| Record<string, unknown>[]
85+
| undefined,
86+
url = URL.createObjectURL(new Blob()),
87+
id = url.split("/").pop(),
8688
index = the[keyIndex] as number,
8789
siblings = the[keySiblings] as Record<string, unknown>[];
8890
URL.revokeObjectURL(url);

0 commit comments

Comments
 (0)