Skip to content

Commit

Permalink
🐛 fix: Fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jan 6, 2025
1 parent 4388ecd commit 3960e59
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env sh

npm run type-check
npm run lint:circular
npx --no-install lint-staged
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,28 @@
"unist-util-visit": "^5.0.0"
},
"devDependencies": {
"@commitlint/cli": "^19.6.0",
"@lobehub/i18n-cli": "^1.20.1",
"@commitlint/cli": "^19.6.1",
"@lobehub/i18n-cli": "^1.20.3",
"@lobehub/lint": "^1.24.4",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.17.7",
"@types/react": "18.2.40",
"@types/react-dom": "^18.3.1",
"@types/node": "^20.17.11",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"@types/uuid": "^9.0.8",
"@vercel/node": "^3.2.26",
"@vercel/node": "^3.2.29",
"@vitest/coverage-v8": "~1.2.2",
"babel-plugin-antd-style": "^1.0.4",
"clean-package": "^2.2.0",
"commitlint": "^19.6.0",
"concurrently": "^9.1.0",
"commitlint": "^19.6.1",
"concurrently": "^9.1.2",
"dpdm": "^3.14.0",
"dumi": "^2.4.14",
"dumi": "^2.4.17",
"dumi-theme-lobehub": "^1.11.0",
"eslint": "^8.57.1",
"father": "^4.5.1",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"lint-staged": "^15.3.0",
"prettier": "^3.4.2",
"remark": "^14.0.3",
"remark-cli": "^11.0.0",
"semantic-release": "^21.1.2",
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/useAudioPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const useAudioPlayer = ({
src,
type = 'audio/mp3',
}: AudioPlayerOptions = {}): AudioPlayerResponse => {
const audioRef = useRef<HTMLAudioElement>();
const audioRef = useRef<HTMLAudioElement>(null);
const [arrayBuffers, setArrayBuffers] = useState<ArrayBuffer[]>([]);
const [currentTime, setCurrentTime] = useState(0);
const [duration, setDuration] = useState(0);
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/useStreamAudioPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface StreamAudioPlayerResponse extends AudioProps {
}

export const useStreamAudioPlayer = (): StreamAudioPlayerResponse => {
const audioRef = useRef<HTMLAudioElement>();
const audioRef = useRef<HTMLAudioElement>(null);
const [arrayBuffers, setArrayBuffers] = useState<ArrayBuffer[]>([]);
const [currentTime, setCurrentTime] = useState(0);
const [duration, setDuration] = useState(0);
Expand Down

0 comments on commit 3960e59

Please sign in to comment.