1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-12 22:29:59 +08:00

fix: error in tag refresh

This commit is contained in:
xieyuhang 2020-06-03 13:24:04 +08:00
parent 0a3a3d0e2d
commit 92fcc8c50b

View File

@ -40,7 +40,10 @@ export default {
const $scrollWrapper = this.scrollWrapper
const tagList = Array.from(window.document.querySelectorAll('#tags-view-container .tags-view-item'))
const currentTag = tagList.find(i => i.dataset.fullPath === currentRoute.fullPath)
// when jumping `/redirect/` at the beginning of the path will not match
if (!currentTag) {
return
}
let firstTag = null
let lastTag = null