This commit is contained in:
黄心宇 2023-09-21 16:30:02 +08:00
parent ab47066441
commit e8d37e5f4e
2 changed files with 8 additions and 4 deletions

View File

@ -55,8 +55,10 @@ function NewsDetail(props){
}, [detail])
function componentWillUnmount() {
document.title= zonedetail.name;
setSeoMeta(`${zonedetail.name},`, zonedetail.name, zonedetail.subTitle, `/zone/${deptId}`)
if (zonedetail) {
document.title= zonedetail.name;
setSeoMeta(`${zonedetail.name},`, zonedetail.name, zonedetail.subTitle, `/zone/${deptId}`)
}
}
function getDetails(){

View File

@ -34,8 +34,10 @@ function SourceDetail(props){
}, [detail])
function componentWillUnmount() {
document.title= zonedetail.name;
setSeoMeta(`${zonedetail.name},`, zonedetail.name, zonedetail.subTitle, `/zone/${deptId}`)
if (zonedetail) {
document.title= zonedetail.name;
setSeoMeta(`${zonedetail.name},`, zonedetail.name, zonedetail.subTitle, `/zone/${deptId}`)
}
}
function getDetails(){