diff --git a/changelog/unreleased/bugfix-public-folder-reload b/changelog/unreleased/bugfix-public-folder-reload new file mode 100644 index 00000000000..11330fd62ed --- /dev/null +++ b/changelog/unreleased/bugfix-public-folder-reload @@ -0,0 +1,6 @@ +Bugfix: Public folder reload + +Reloading a folder on a public link page is no longer broken. + +https://github.com/owncloud/web/pull/11904 +https://github.com/owncloud/web/issues/11902 diff --git a/packages/web-pkg/src/composables/piniaStores/resources.ts b/packages/web-pkg/src/composables/piniaStores/resources.ts index 87d91dbc5be..40ee4d59d80 100644 --- a/packages/web-pkg/src/composables/piniaStores/resources.ts +++ b/packages/web-pkg/src/composables/piniaStores/resources.ts @@ -293,12 +293,14 @@ export const useResourcesStore = defineStore('resources', () => { } else { const { parentFolderId } = Object.values(data)[0] const space = spacesStore.spaces.find(({ id }) => parentFolderId.startsWith(id)) - data['/'] = { - id: space.id, - shareTypes: space.shareTypes, - parentFolderId: space.id, - spaceId: space.id, - path: '/' + if (space) { + data['/'] = { + id: space.id, + shareTypes: space.shareTypes, + parentFolderId: space.id, + spaceId: space.id, + path: '/' + } } } }