瀏覽代碼

80783 check existence before use it

Yohei-Shiina 4 年之前
父節點
當前提交
07b750dd19
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/app/src/components/SearchPage/SearchResultList.tsx

+ 1 - 1
packages/app/src/components/SearchPage/SearchResultList.tsx

@@ -29,7 +29,7 @@ const SearchResultList: FC<Props> = (props:Props) => {
   const focusedPageId = focusedPage != null && focusedPage._id != null ? focusedPage._id : '';
   return (
     <>
-      {props.pages.map((page) => {
+      {Array.isArray(props.pages) && props.pages.map((page) => {
         return (
           <SearchResultListItem
             key={page._id}