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

Handle missing location query param #1069

Merged
merged 1 commit into from
Apr 27, 2022
Merged
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
Handle missing location query param
  • Loading branch information
jjnesbitt committed Apr 26, 2022
commit b7fcca1d576be096fafb01a8eeb39cef228b7b64
8 changes: 7 additions & 1 deletion web/src/views/FileBrowserView/FileBrowser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,13 @@ export default defineComponent({

// go to the directory specified in the URL if it changes
watch(() => ctx.root.$route, (route) => {
location.value = route.query.location.toString() || rootDirectory;
location.value = (
Array.isArray(route.query.location)
? route.query.location[0]
: route.query.location
) || rootDirectory;

// Retrieve with new location
getItems();
}, { immediate: true });

Expand Down