refactor: setup with search url

This commit is contained in:
kunish 2024-06-02 21:51:29 +08:00
parent bd4f45dd30
commit 3d0fbba17d
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

View File

@ -110,11 +110,11 @@ export default () => {
onMount(() => {
let search = location.search
if (search.length === 0) {
if (search) {
const searchList = location.hash.match(/\?.*$/)
if (searchList.length > 0 && searchList[0].length > 0) {
search = searchList[0].replace('?', '', 1)
if (Array.isArray(searchList) && searchList[0]) {
search = searchList[0].replace('?', '')
}
}