Skip to content

Commit cb9a153

Browse files
committed
Fix spaces list of a site
1 parent 160ae3d commit cb9a153

File tree

1 file changed

+4
-4
lines changed
  • packages/gitbook/src/app/(space)

1 file changed

+4
-4
lines changed

Diff for: packages/gitbook/src/app/(space)/fetch.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -200,18 +200,18 @@ async function fetchParentSite(args: {
200200
getSiteSpaces({ organizationId, siteId, siteShareKey }),
201201
]);
202202

203-
const spaces: Record<string, Space> = {};
203+
const spaces: Array<Space> = [];
204204
siteSpaces.forEach((siteSpace) => {
205-
spaces[siteSpace.space.id] = {
205+
spaces.push({
206206
...siteSpace.space,
207207
urls: {
208208
...siteSpace.space.urls,
209209
published: siteSpace.urls.published,
210210
},
211-
};
211+
});
212212
});
213213

214-
return { parent: site, spaces: Object.values(spaces) };
214+
return { parent: site, spaces };
215215
}
216216

217217
/**

0 commit comments

Comments
 (0)