Embed: don't attempt to remove error element if it is not shown

This commit is contained in:
Cat 2018-07-05 11:30:55 +02:00 committed by Thulinma
parent d944d4600e
commit e5c1c6f8c4

View file

@ -915,7 +915,7 @@ function mistPlay(streamName,options) {
button.appendChild(t); button.appendChild(t);
err.appendChild(button); err.appendChild(button);
button.onclick = function(){ button.onclick = function(){
options.target.removeChild(err); if (err.parentElement) { err.parentElement.removeChild(err); }
delete options.startCombo; delete options.startCombo;
if (err.timeOut) { if (err.timeOut) {
clearTimeout(err.timeOut); clearTimeout(err.timeOut);