Skip to content

Commit

Permalink
fix(useSearchParam.taro): 兼容 taro 3.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Aug 23, 2020
1 parent dfa769a commit c797ed2
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 38 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"devDependencies": {
"@microsoft/api-documenter": "7.8.33",
"@microsoft/api-extractor": "7.9.9",
"@tarojs/taro": "3.0.7",
"@tarojs/taro": "3.0.8",
"@testing-library/react": "10.4.9",
"@testing-library/react-hooks": "3.4.1",
"@types/fs-extra": "9.0.1",
Expand Down
104 changes: 68 additions & 36 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/react/useSearchParam.taro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { useRouter } from '@tarojs/taro'

export const useSearchParam: typeof _useSearchParam = param => {
const { params } = useRouter()
return params[param] == null ? null : params[param]
return params[param] == null ? null : params[param]!
}

0 comments on commit c797ed2

Please sign in to comment.