Skip to content

Commit 6d68dd8

Browse files
author
Jerry Bruwes
committed
modified: index.ts
1 parent a665551 commit 6d68dd8

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Reactive } from "vue";
22

33
import { v4 } from "uuid";
4-
import { computed, isReactive, nextTick, reactive } from "vue";
4+
import { computed, isReactive, reactive } from "vue";
55

66
const configurable = true;
77
export default (
@@ -160,7 +160,7 @@ export default (
160160
}
161161
return undefined;
162162
};
163-
const remove = async (pId: string | undefined) => {
163+
const remove = (pId: string | undefined) => {
164164
const the = leaves.value.find((leaf) => leaf[keyId] === pId);
165165
if (the) {
166166
const next = the[keyNext] as Record<string, unknown> | undefined;
@@ -182,10 +182,7 @@ export default (
182182
the[keyIndex] as number,
183183
1,
184184
);
185-
if (!id) {
186-
await nextTick();
187-
[{ id }] = leaves.value as [{ id: string }];
188-
}
185+
if (!id) [{ id }] = leaves.value as [{ id: string }];
189186
return id;
190187
}
191188
}

0 commit comments

Comments
 (0)