fix: 修复 exploreItem 分页报错,projects 点击列表跳转页面, 初始获取路由为null报错

This commit is contained in:
@changcode
2022-03-24 09:46:14 +08:00
parent 7f0eebcd86
commit e2e7eaec2a
2 changed files with 5 additions and 2 deletions

View File

@@ -336,7 +336,10 @@ export default {
}
},
created () {
const path = this.$route.fullPath.match(/\/(\S*)\?/)[1]
let path = ''
if (this.$route.fullPath.match(/\/(\S*)\?/)) {
path = this.$route.fullPath.match(/\/(\S*)\?/)[1]
}
if (this.$route.query.orderBy && !this.isSubList) {
this.orderBy = this.$route.query.orderBy
}