mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-04 08:38:34 +00:00
fix(core): do not create first app if local workspace disabled (#13289)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Prevented creation of initial app data when local workspace functionality is disabled, ensuring correct behavior based on user settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -147,9 +147,10 @@ export const Component = ({
|
||||
}, [desktopApi]);
|
||||
|
||||
useEffect(() => {
|
||||
if (listIsLoading || list.length > 0) {
|
||||
if (listIsLoading || list.length > 0 || !enableLocalWorkspace) {
|
||||
return;
|
||||
}
|
||||
|
||||
createFirstAppData(workspacesService)
|
||||
.then(createdWorkspace => {
|
||||
if (createdWorkspace) {
|
||||
@@ -177,6 +178,7 @@ export const Component = ({
|
||||
loggedIn,
|
||||
listIsLoading,
|
||||
list,
|
||||
enableLocalWorkspace,
|
||||
]);
|
||||
|
||||
if (navigating || creating) {
|
||||
|
||||
Reference in New Issue
Block a user