fix(core): inherit sortIndex when creating version stack container

This commit is contained in:
yiling
2026-06-15 20:38:46 +08:00
parent 45318d1eec
commit 2858274e52
4 changed files with 9 additions and 0 deletions
@@ -58,6 +58,9 @@ export class VersionStackService {
throw new Error('parent not found')
}
const firstFile = files[0]
const sortIndex = firstFile?.sortIndex || null
const stack = await tx.asset.create({
data: {
type: AssetType.version_stack,
@@ -67,6 +70,7 @@ export class VersionStackService {
projectId: projectId,
creatorId: creatorId,
parentId: parentId,
sortIndex: sortIndex,
},
})