diff --git a/src/hooks/web/usePermission.ts b/src/hooks/web/usePermission.ts index bfff591da..c367875f1 100644 --- a/src/hooks/web/usePermission.ts +++ b/src/hooks/web/usePermission.ts @@ -30,7 +30,7 @@ export function usePermission() { async function togglePermissionMode() { appStore.setProjectConfig({ permissionMode: - projectSetting.permissionMode === PermissionModeEnum.BACK + appStore.projectConfig?.permissionMode === PermissionModeEnum.BACK ? PermissionModeEnum.ROUTE_MAPPING : PermissionModeEnum.BACK, });