Render nothing if ruleId is empty

This commit is contained in:
Alban Auzeill 2020-06-23 15:34:20 +02:00
parent 9895828f7f
commit 0788837c47

View File

@ -22,6 +22,10 @@
<script src="asciidoctor/asciidoctor.js"></script>
<script>
function renderRule(/*string*/ruleId) {
if (ruleId === "") {
document.getElementById("div-result").innerHTML = "";
return;
}
const asciiDoctor = Asciidoctor();
const rulesDir = parentDirectory(location.href) + "rules";
const ruleFile = rulesDir + "/" + ruleId + "/rule.adoc";