@@ -44,7 +44,7 @@ export interface ResolvedContentRef {
44
44
/** Resolved reusable content, if the ref points to reusable content on a revision. Also contains the space and revision used for resolution. */
45
45
reusableContent ?: {
46
46
revisionReusableContent : RevisionReusableContent ;
47
- space : string ;
47
+ space : Space ;
48
48
revision : string ;
49
49
} ;
50
50
/** Resolve OpenAPI spec filesystem. */
@@ -236,10 +236,10 @@ export async function resolveContentRef(
236
236
237
237
case 'reusable-content' : {
238
238
// Figure out which space and revision the reusable content is in.
239
- const container : { space : string ; revision : string } | null = await ( async ( ) => {
239
+ const container : { space : Space ; revision : string } | null = await ( async ( ) => {
240
240
// without a space on the content ref, or if the space is the same as the current one, we can use the current revision.
241
241
if ( ! contentRef . space || contentRef . space === context . space . id ) {
242
- return { space : context . space . id , revision : revisionId } ;
242
+ return { space : context . space , revision : revisionId } ;
243
243
}
244
244
245
245
const space = await getDataOrNull (
@@ -253,7 +253,7 @@ export async function resolveContentRef(
253
253
return null ;
254
254
}
255
255
256
- return { space : space . id , revision : space . revision } ;
256
+ return { space, revision : space . revision } ;
257
257
} ) ( ) ;
258
258
259
259
if ( ! container ) {
@@ -262,7 +262,7 @@ export async function resolveContentRef(
262
262
263
263
const reusableContent = await getDataOrNull (
264
264
dataFetcher . getReusableContent ( {
265
- spaceId : container . space ,
265
+ spaceId : container . space . id ,
266
266
revisionId : container . revision ,
267
267
reusableContentId : contentRef . reusableContent ,
268
268
} )
0 commit comments