mirror of
https://github.com/streamich/react-use.git
synced 2026-01-18 14:06:52 +00:00
Fix error message typo
This commit is contained in:
parent
38d5587c0f
commit
46e01e09dc
@ -197,11 +197,19 @@ const createHTMLMediaHook = (tag: 'audio' | 'video') => {
|
||||
|
||||
if (!el) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.error(
|
||||
'useAudio() ref to <audio> element is empty at mount. ' +
|
||||
'It seem you have not rendered the audio element, which is ' +
|
||||
'returns as the first argument const [audio] = useAudio(...).'
|
||||
);
|
||||
if (tag === 'audio') {
|
||||
console.error(
|
||||
'useAudio() ref to <audio> element is empty at mount. ' +
|
||||
'It seem you have not rendered the audio element, which it ' +
|
||||
'returns as the first argument const [audio] = useAudio(...).'
|
||||
);
|
||||
} else if (tag === 'video') {
|
||||
console.error(
|
||||
'useVideo() ref to <video> element is empty at mount. ' +
|
||||
'It seem you have not rendered the video element, which it ' +
|
||||
'returns as the first argument const [video] = useVideo(...).'
|
||||
);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user