Skip to content

Commit

Permalink
Merge pull request #5789 from jenshnielsen/indexfallback
Browse files Browse the repository at this point in the history
Index.html template. Only insert snippet if found
  • Loading branch information
tacaswell committed Jan 3, 2016
2 parents deea685 + 4c9fc07 commit f6fca8a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/_templates/index.html
Expand Up @@ -29,7 +29,11 @@
// Synchronous request, wait till we have it all
req.open('GET', url, false);
req.send(null);
element.innerHTML = req.responseText;
if (req.status == 200) {
element.innerHTML = req.responseText;
} else {
element.innerHTML = "<mark>Could not find Snippet to insert at " + url + "</mark>"
}
}
}
</script>
Expand Down

0 comments on commit f6fca8a

Please sign in to comment.