1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 11:04:00 +03:00

Use Indexed/Keyed so we can differentiate leaves.

This commit is contained in:
Rob Rix 2015-10-21 16:17:30 -04:00
parent 3e58fd0ec3
commit d31f3ce85d

View File

@ -74,11 +74,11 @@
if (view instanceof Term) {
var element = document.createElement("div");
element.classList.add("term");
if (view.syntax instanceof Array) {
if (view.syntax instanceof Indexed) {
for (i in view.syntax) {
element.appendChild(toDOM(view.syntax[i]));
}
} else if (view.syntax instanceof Object) {
} else if (view.syntax instanceof Keyed) {
for (k in view.syntax) {
element.appendChild(toDOM(view.syntax[k]));
}