mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
GridBuffer: skip empty inbox
This commit is contained in:
parent
357508e3d2
commit
b914144ae5
1 changed files with 4 additions and 2 deletions
|
|
@ -8,9 +8,11 @@ export default function ({ inbox, currentWindow }) {
|
||||||
const [messages, setMessages] = useState([])
|
const [messages, setMessages] = useState([])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const currentInbox =
|
const currentInboxObj =
|
||||||
inbox.find(({ id }) =>
|
inbox.find(({ id }) =>
|
||||||
id === currentWindow.id).lines
|
id === currentWindow.id)
|
||||||
|
|
||||||
|
const currentInbox = currentInboxObj?.lines ?? []
|
||||||
|
|
||||||
const newOrPrev = (cur, prev) => i => {
|
const newOrPrev = (cur, prev) => i => {
|
||||||
const byId = (list, i) =>
|
const byId = (list, i) =>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue