Hotfix potentially null recents array

This commit is contained in:
Justin Edmund 2022-03-11 02:52:13 -08:00
parent a93819a908
commit 0680699822

View file

@ -126,7 +126,7 @@ const SearchModal = (props: Props) => {
}
}
if (recents.length > 5) recents.pop()
if (recents && recents.length > 5) recents.pop()
setCookies(`recent_${props.object}`, recents, { path: '/' })
sendData(result)
}