Render nothing if ruleId is empty
This commit is contained in:
parent
9895828f7f
commit
0788837c47
@ -22,6 +22,10 @@
|
|||||||
<script src="asciidoctor/asciidoctor.js"></script>
|
<script src="asciidoctor/asciidoctor.js"></script>
|
||||||
<script>
|
<script>
|
||||||
function renderRule(/*string*/ruleId) {
|
function renderRule(/*string*/ruleId) {
|
||||||
|
if (ruleId === "") {
|
||||||
|
document.getElementById("div-result").innerHTML = "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
const asciiDoctor = Asciidoctor();
|
const asciiDoctor = Asciidoctor();
|
||||||
const rulesDir = parentDirectory(location.href) + "rules";
|
const rulesDir = parentDirectory(location.href) + "rules";
|
||||||
const ruleFile = rulesDir + "/" + ruleId + "/rule.adoc";
|
const ruleFile = rulesDir + "/" + ruleId + "/rule.adoc";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user