Skip to content

Commit 571e400

Browse files
committed
Do not make request in case of fake entry
1 parent b5bdddd commit 571e400

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/ui/units/connections/components/Page/Page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ const PageComponent = (props: PageProps) => {
162162
const isRevisionsEnabled = isEnabledFeature(Feature.EnableConnectionRevisions);
163163
const isExportSettingsFeatureEnabled = isEnabledFeature(Feature.EnableExportSettings);
164164
const isDescriptionEnabled = isEnabledFeature(Feature.EnableConnectionDescription);
165+
const isFakeEntry = entry && 'fake' in entry && entry.fake;
165166

166167
const revisionsSupported = connector?.history && isRevisionsEnabled;
167168
const revId = currentSearchParams.get(URL_QUERY.REV_ID) ?? undefined;
@@ -196,10 +197,10 @@ const PageComponent = (props: PageProps) => {
196197
}, [actions, extractedEntryId, workbookId]);
197198

198199
React.useEffect(() => {
199-
if (revisionsSupported) {
200+
if (revisionsSupported && !isFakeEntry) {
200201
actions.setRevision(revId);
201202
}
202-
}, [revId, revisionsSupported, actions]);
203+
}, [revId, revisionsSupported, actions, isFakeEntry]);
203204

204205
const setActualVersion = React.useMemo(
205206
() =>

src/ui/units/connections/store/actions/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ interface GetConnectionDataRequestProps {
7878
flattenConnectors: ConnectorItem[];
7979
rev_id?: string;
8080
}
81-
export async function getConnectionDataRequest({
81+
82+
async function getConnectionDataRequest({
8283
entry,
8384
flattenConnectors,
8485
rev_id,

0 commit comments

Comments
 (0)