Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): wrong app scheme fallback (#8914)

liuyi0a20332674af
diff --git a/packages/frontend/core/src/desktop/pages/open-app/index.tsx b/packages/frontend/core/src/desktop/pages/open-app/index.tsx
index b0b2e82e1a..f61ac12f9b 100644
--- a/packages/frontend/core/src/desktop/pages/open-app/index.tsx
+++ b/packages/frontend/core/src/desktop/pages/open-app/index.tsx
@@ -1,5 +1,5 @@
import { OpenInAppPage } from '@affine/core/modules/open-in-app/views/open-in-app-page';
-import { appSchemes } from '@affine/core/utils/channel';
+import { appSchemes, channelToScheme } from '@affine/core/utils/channel';
import type { GetCurrentUserQuery } from '@affine/graphql';
import { fetcher, getCurrentUserQuery } from '@affine/graphql';
import type { LoaderFunction } from 'react-router-dom';
@@ -37,7 +37,9 @@ const OpenOAuthJwt = () => {
const [params] = useSearchParams();
const maybeScheme = appSchemes.safeParse(params.get('scheme'));
- const scheme = maybeScheme.success ? maybeScheme.data : 'affine';
+ const scheme = maybeScheme.success
+ ? maybeScheme.data
+ : channelToScheme[BUILD_CONFIG.appBuildType];
const next = params.get('next');
if (!currentUser || !currentUser?.token?.sessionToken) {