Skip to content

Commit

Permalink
fix: resolve multiple console errors (#167)
Browse files Browse the repository at this point in the history
Co-authored-by: Fergus MacConnell <f.macconnell@gmail.com>
  • Loading branch information
raarielgrace and fergmac authored Nov 7, 2024
1 parent 1b15bef commit 6cafb81
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion frontend/src/common/mapbox/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ export function popupLink (route, $router, text) {
anchor.onclick = (e) => {
if (!e.ctrlKey) {
e.preventDefault()
$router.push(route)
// The catch statement prevents duplicate route errors
$router.push(route).catch(()=>{})
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/qaqc/components/QaQcTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export default {
},
applyFilter ({ id }, values) {
this.filterParams[id] = values
const filterGroup = { ...this.searchQueryParams }
const filterGroup = { ...this.searchQueryParamsQAQC }
this.$store.commit(SET_QAQC_RESULT_FILTERS, filterGroup)
this.$emit('filter-changed', filterGroup)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/qaqc/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ const wellsStore = {
qaqcWellFileDownloads (state) {
return state.downloads
},
searchQueryParams (state) {
searchQueryParamsQAQC (state) {
return buildSearchParams(state)
},
qaqcSelectedTab (state) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/registry/components/people/PersonDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
centered
:title="`Confirm register as ${item.desc}`"
@shown="$refs[`confirmRegisterConfirmBtn${item.code}`][0].focus()"
:return-focus="$refs[`registerButton${item.code}`]">
:return-focus="$refs[`registerButton${item.code}`] ? $refs[`registerButton${item.code}`][0] : ''">
Are you sure you want to register {{ currentDriller.first_name }} {{ currentDriller.surname }} as a {{ item.desc }}?
<div slot="modal-footer">
<b-btn
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/wells/views/WellDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
<b-row>
<b-col cols="12" md="4"><span class="font-weight-bold">Intended Water Use:</span> {{ well.intended_water_use }}</b-col>
<b-col cols="12" md="4"><span class="font-weight-bold">Aquifer Number: </span>
<router-link :to="{ name: 'aquifers-view', params: { id: well.aquifer } }">
<router-link v-if="well.aquifer !== undefined" :to="{ name: 'aquifers-view', params: { id: well.aquifer } }">
{{ well.aquifer }}
</router-link>
</b-col>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/wells/views/WellSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ export default {
},
updateQueryParams () {
const tabHash = (this.tabIndex === 1) ? 'advanced' : null
this.$router.replace({ query: this.buildQueryParams(), hash: tabHash })
// The catch statement prevents duplicate route errors
this.$router.replace({ query: this.buildQueryParams(), hash: tabHash }).catch(()=>{})
},
buildQueryParams () {
const query = { ...this.searchParams }
Expand Down

0 comments on commit 6cafb81

Please sign in to comment.