File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -929,7 +929,7 @@ export function ApplicationsSection(props: any) {
929929 < ResourceListLoader isMobile = { isMobile } resources = { applications } />
930930 ) : (
931931 < >
932- { ! isAiAgentInstanceEnabled && (
932+ { ( ! isAiAgentInstanceEnabled || ! isAiAgentFlowEnabled ) && (
933933 < ApplicationCardList
934934 applications = { nonAnvilApplications }
935935 canInviteToWorkspace = { canInviteToWorkspace }
@@ -946,7 +946,7 @@ export function ApplicationsSection(props: any) {
946946 workspaceId = { activeWorkspace . id }
947947 />
948948 ) }
949- { isAiAgentFlowEnabled && (
949+ { isAiAgentFlowEnabled && isAiAgentInstanceEnabled && (
950950 < ApplicationCardList
951951 applications = { anvilApplications }
952952 canInviteToWorkspace = { canInviteToWorkspace }
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ const Header = () => {
142142 ) ;
143143
144144 const deployLink = useHref ( viewerURL , {
145- basePageId : currentPage ?. basePageId ,
145+ basePageId : currentPage ?. basePageId || null ,
146146 } ) ;
147147
148148 const updateApplicationDispatch = (
Original file line number Diff line number Diff line change @@ -300,7 +300,15 @@ export function useHref<T extends URLBuilderParams>(
300300 const pageId = useSelector ( getCurrentPageId ) ;
301301
302302 useEffect ( ( ) => {
303- if ( pageId ) setHref ( urlBuilderFn ( params ) ) ;
303+ if ( pageId ) {
304+ try {
305+ setHref ( urlBuilderFn ( params ) ) ;
306+ } catch ( error ) {
307+ // If basePageId is not available yet, keep href as empty string
308+ // This can happen during initial page load or navigation
309+ setHref ( "" ) ;
310+ }
311+ }
304312 } , [ params , urlBuilderFn , pageId ] ) ;
305313
306314 return href ;
You can’t perform that action at this time.
0 commit comments