How to remove component that is empty on dynamic page?

Yeah, I couldn’t find a way to actually delete the component if there was no url being dynamically added. But I was able to deal with the error message and hide the html elment. So at least the page isn’t loading up a hidden placeholder url or keep getting an error (its basically an empty DIV that is hidden until a URL is provided on the backend).