Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/client/src/ce/pages/Applications/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ export function ApplicationsSection(props: any) {
<ResourceListLoader isMobile={isMobile} resources={applications} />
) : (
<>
{!isAiAgentInstanceEnabled && (
{(!isAiAgentInstanceEnabled || !isAiAgentFlowEnabled) && (
<ApplicationCardList
applications={nonAnvilApplications}
canInviteToWorkspace={canInviteToWorkspace}
Expand All @@ -946,7 +946,7 @@ export function ApplicationsSection(props: any) {
workspaceId={activeWorkspace.id}
/>
)}
{isAiAgentFlowEnabled && (
{isAiAgentFlowEnabled && isAiAgentInstanceEnabled && (
<ApplicationCardList
applications={anvilApplications}
canInviteToWorkspace={canInviteToWorkspace}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const Header = () => {
);

const deployLink = useHref(viewerURL, {
basePageId: currentPage?.basePageId,
basePageId: currentPage?.basePageId || null,
});

const updateApplicationDispatch = (
Expand Down
10 changes: 9 additions & 1 deletion app/client/src/pages/Editor/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,15 @@ export function useHref<T extends URLBuilderParams>(
const pageId = useSelector(getCurrentPageId);

useEffect(() => {
if (pageId) setHref(urlBuilderFn(params));
if (pageId) {
try {
setHref(urlBuilderFn(params));
} catch (error) {
// If basePageId is not available yet, keep href as empty string
// This can happen during initial page load or navigation
setHref("");
}
}
}, [params, urlBuilderFn, pageId]);

return href;
Expand Down
Loading