explicitly retuen null

and also sort out formatting from a different time
pull/21833/head
David Baker 2020-11-05 09:47:09 +00:00
parent 90bbc082dc
commit 9be3ce928f
1 changed files with 5 additions and 2 deletions

View File

@ -103,8 +103,11 @@ function getRemoteAudioElement(): HTMLAudioElement {
// Might as well just use DOM.
const remoteAudioElement = document.getElementById("remoteAudio") as HTMLAudioElement;
if (!remoteAudioElement) {
console.error("Failed to find remoteAudio element - cannot play audio!"
+ "You need to add an <audio/> to the DOM.");
console.error(
"Failed to find remoteAudio element - cannot play audio!" +
"You need to add an <audio/> to the DOM.",
);
return null;
}
return remoteAudioElement;
}