Remove JS error, when no iframe exist

If the iframe is not represented on the page, this code will not be executed.