Skip to content

Commit

Permalink
fix: 修正url参数
Browse files Browse the repository at this point in the history
  • Loading branch information
Souma-Sumire committed Oct 7, 2024
1 parent 72b3469 commit fb82a97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/keigennRecord2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ export const useKeigennRecord2Store = defineStore('keigennRecord2', {

function parseParams<T>(v: string, def: T): T {
if (typeof def === 'boolean') {
if (v === '0' || v.toLocaleLowerCase() === 'false')
if (v === '0' || v?.toLocaleLowerCase() === 'false')
return false as T
if (v === '1' || v.toLocaleLowerCase() === 'true')
if (v === '1' || v?.toLocaleLowerCase() === 'true')
return true as T
return def
}
Expand Down

0 comments on commit fb82a97

Please sign in to comment.