Skip to content

Commit

Permalink
fix: verify route.params.id is set
Browse files Browse the repository at this point in the history
  • Loading branch information
connorhsm committed Oct 26, 2024
1 parent 1040bd3 commit c00e68b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ObjectSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export default {
if (VueSelectElem.value) VueSelectElem.value.search = "";
if (VueSelectElem.value) VueSelectElem.value.mutableValue = null;
placeholderVal.value = "Search";
} else {
let newSelectedObject = GameObject.find(route?.params?.id.split('-')[0]);
} else if (route.params.id) {
let newSelectedObject = GameObject.find(route.params.id.split('-')[0]);
if (VueSelectElem.value) VueSelectElem.value.mutableValue = newSelectedObject;
}
}),
Expand Down

0 comments on commit c00e68b

Please sign in to comment.