Skip to content

Commit

Permalink
chore: null safety
Browse files Browse the repository at this point in the history
  • Loading branch information
TT1228 committed Dec 26, 2024
1 parent 994e0f6 commit f7c4119
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ watch([entityMap, initialized], (newData, oldData) => {
* ---------------
*/
const handleClickCancel = (): void => {
if (route.query.cancelRoute) {
if (route?.query?.cancelRoute) {
const cancelRoute = JSON.parse(route.query.cancelRoute as string)
router.push(cancelRoute)
} else if (props.config.cancelRoute) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ onMounted(async () => {
isLoading.value = false
nextTick(() => {
if (route.query.anchor) {
if (route?.query?.anchor) {
const card = document.getElementById(route.query.anchor as string)
if (card) {
card.scrollIntoView()
Expand Down

0 comments on commit f7c4119

Please sign in to comment.