diff --git a/src/military/iframe.jsx b/src/military/iframe.jsx index f9feccb71..d7f04e9c2 100644 --- a/src/military/iframe.jsx +++ b/src/military/iframe.jsx @@ -10,9 +10,16 @@ const Iframe = (props) => { const history = props.history const location = history.location + if (!location.state.url) { + history.push("/404"); + } + function iframeLoad() { let myIframe = document.getElementById("iframe"); myIframe.height = `${document.documentElement.clientHeight - 300}px` + if (myIframe.contentWindow.location && myIframe.contentWindow.location.href) { + window.location.href = myIframe.contentWindow.location.href + } } return