Hotfix potentially null recents array
This commit is contained in:
parent
a93819a908
commit
0680699822
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue