isBrowser方法调整

This commit is contained in:
tangly1024.com
2023-08-01 12:47:33 +08:00
parent 115b43b429
commit 6eb50b1138
28 changed files with 41 additions and 42 deletions

View File

@@ -177,7 +177,7 @@ const LayoutSearch = props => {
const slotTop = <div className='pb-12'><SearchInput {...props} /></div>
const router = useRouter()
useEffect(() => {
if (isBrowser()) {
if (isBrowser) {
// 高亮搜索到的结果
const container = document.getElementById('posts-wrapper')
if (keyword && container) {