fix nobelium build

This commit is contained in:
tangly1024.com
2023-07-21 18:53:49 +08:00
parent 175fc852a5
commit 7579d9c628

View File

@@ -3,6 +3,7 @@ import { useGlobal } from '@/lib/global'
import Link from 'next/link'
import React from 'react'
import throttle from 'lodash.throttle'
import { deepClone } from '@/lib/utils'
export const BlogListScroll = props => {
const { posts } = props
@@ -11,8 +12,8 @@ export const BlogListScroll = props => {
const [page, updatePage] = React.useState(1)
let hasMore = false
const postsToShow = posts
? Object.assign(posts).slice(0, BLOG.POSTS_PER_PAGE * page)
const postsToShow = posts && Array.isArray(posts)
? deepClone(posts).slice(0, BLOG.POSTS_PER_PAGE * page)
: []
if (posts) {