Fix error message typo

This commit is contained in:
Steven Lundy 2020-04-01 14:11:28 -07:00 committed by GitHub
parent 38d5587c0f
commit 46e01e09dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}