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]);
|
}, [desktopApi]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (listIsLoading || list.length > 0) {
|
if (listIsLoading || list.length > 0 || !enableLocalWorkspace) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
createFirstAppData(workspacesService)
|
createFirstAppData(workspacesService)
|
||||||
.then(createdWorkspace => {
|
.then(createdWorkspace => {
|
||||||
if (createdWorkspace) {
|
if (createdWorkspace) {
|
||||||
@@ -177,6 +178,7 @@ export const Component = ({
|
|||||||
loggedIn,
|
loggedIn,
|
||||||
listIsLoading,
|
listIsLoading,
|
||||||
list,
|
list,
|
||||||
|
enableLocalWorkspace,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (navigating || creating) {
|
if (navigating || creating) {
|
||||||
|
|||||||
Reference in New Issue
Block a user