Skip to content

Commit

Permalink
fix: drag api group tree error when save (#32)
Browse files Browse the repository at this point in the history
@buqiyuan nice~
  • Loading branch information
buqiyuan committed May 18, 2022
1 parent 039c1a6 commit 0e90ddd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/platform/browser/IndexedDB/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class Storage extends Dexie implements StorageInterface {
}
});
table
.bulkGet(uuids)
.bulkGet(uuids.map(Number))
.then((existItems) => {
if (existItems) {
let newItems: Array<StorageItem> = [];
Expand All @@ -146,7 +146,12 @@ class Storage extends Dexie implements StorageInterface {
});
// @ts-ignore
table
.bulkPut(newItems)
.bulkPut(
newItems.map((n: any) => ({
...n,
groupID: ~~n.groupID.replace('group-', ''),
}))
)
.then((result) => {
obs.next({ number: result, items: newItems });
obs.complete();
Expand Down

0 comments on commit 0e90ddd

Please sign in to comment.