Skip to content

Commit

Permalink
fix(snapshot): migration wrong item ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Sep 17, 2024
1 parent 427159d commit 76325f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/snapshot/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export async function migrateSnapshotFolder(snapshotFolder: string) {
const dataPerResource = new Map<string, Record<string, any>>()

for (const file of files) {
const [resourceName, id] = file.split('/')
const [resourceName, filename] = file.split('/')
const id = path.basename(filename, '.json')
const filePath = path.join(snapshotFolder, file)
const content = await fs.promises.readFile(filePath, 'utf8')
const fileData = SuperJSON.parse(content)
Expand Down

0 comments on commit 76325f7

Please sign in to comment.