File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -448,9 +448,9 @@ export async function previewCommand(
448448 } ) ;
449449
450450 // Check project visibility for private projects
451- let build ;
451+ let buildResponse ;
452452 try {
453- build = await getBuild ( client , buildId ) ;
453+ buildResponse = await getBuild ( client , buildId ) ;
454454 } catch ( error ) {
455455 if ( error . status === 404 ) {
456456 output . error ( `Build not found: ${ buildId } ` ) ;
@@ -463,8 +463,10 @@ export async function previewCommand(
463463 }
464464
465465 // Check if project is private and user hasn't acknowledged public link access
466+ // Note: API returns { build, project } at top level, not nested
466467 // Use === false to handle undefined/missing isPublic defensively
467- let isPrivate = build . project && build . project . isPublic === false ;
468+ let project = buildResponse . project ;
469+ let isPrivate = project && project . isPublic === false ;
468470 if ( isPrivate && ! options . publicLink ) {
469471 output . error ( 'This project is private.' ) ;
470472 output . blank ( ) ;
You can’t perform that action at this time.
0 commit comments