Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reloading a public folder #11904

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-public-folder-reload
Original file line number Diff line number Diff line change
@@ -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
14 changes: 8 additions & 6 deletions packages/web-pkg/src/composables/piniaStores/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '/'
}
}
}
}
Expand Down