Commit 69a3dac2 authored by Sean Hammond's avatar Sean Hammond Committed by GitHub

Merge pull request #445 from hypothesis/fix-js-er

Fixing js error on :3000 page
parents 7f965106 7f98162a
......@@ -120,7 +120,9 @@ function LiveReloadServer(port, config) {
document.body.appendChild(embedScript);
var iframeIsAdded = false;
document.querySelector('#add-test').addEventListener('click', function() {
var addIframeBtn = document.querySelector('#add-test');
if(addIframeBtn){
addIframeBtn.addEventListener('click', function() {
if (!iframeIsAdded) {
var iframe1 = document.querySelector('#iframe1');
var iframeNew = iframe1.cloneNode();
......@@ -134,6 +136,7 @@ function LiveReloadServer(port, config) {
iframeIsAdded = false;
}
});
}
</script>
</body>
</html>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment