message: fix a bug which caused by unmount
diff: @@ -82,6 +82,7 @@ function ApiPage({
  const {
  state: { language },
  } = useStateMachine()
  + const isUnmount = useRef(false)
  const { currentLanguage } =
  language && language.currentLanguage
  ? language
  @@ -166,12 +167,14 @@ function ApiPage({
  }, [])
  useEffect(() => {
  + if (isUnmount.current) return
  try {
  const observer = new IntersectionObserver(
  entries => {
  let index = 0
  const allTops = []
  for (const entrie of entries) {
  + try {
  for (const key in apiSectionsRef.current) {
  const { top } = apiSectionsRef.current[
  key
  @@ -179,6 +182,7 @@ function ApiPage({
  allTops.push(top)
  index++
  }
  + } catch {}
  }
  index = 0
  @@ -207,6 +211,10 @@ function ApiPage({
  }
  })
  } catch {}
  +
  + return () => {
  + isUnmount.current = true
  + }
  }, [])
  return (
  