Skip to content
This repository was archived by the owner on Jan 19, 2026. It is now read-only.

Commit b19e032

Browse files
Merge pull request #737 from storyblok/fix/sync-params-order
fix: execute folders sync first
2 parents 42aa28b + 4707b95 commit b19e032

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/tasks/sync.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,11 @@ const SyncSpaces = {
272272
const sync = (types, options) => {
273273
SyncSpaces.init(options)
274274

275-
const tasks = types.map(_type => {
275+
const tasks = types.sort((a, b) => {
276+
if (a === 'folders') return -1
277+
if (b === 'folders') return 1
278+
return 0
279+
}).map(_type => {
276280
const command = `sync${capitalize(_type)}`
277281

278282
return () => SyncSpaces[command]()

0 commit comments

Comments
 (0)