@@ -37,16 +37,16 @@ function Wiki (sites) {
37 this.refresh = () => {
37 this.refresh = () => {
39 if (this.loc) {
39 if (this.loc) {
40− if (this.byName[this.loc]) {
41− let html = `${this.templateTerm(this.loc, this.byName[this.loc])}<br />${this.templateRelated(this.loc, this.byName[this.loc])}`
42− this._entry.innerHTML = html
43− } else if (this.byCat[this.loc]) {
40+ if (this.byCat[this.loc]) {
44 let html = ''
41 let html = ''
45 for (const id in this.byCat[this.loc]) {
42 for (const id in this.byCat[this.loc]) {
46 const name = this.byCat[this.loc][id].name
43 const name = this.byCat[this.loc][id].name
47 html += `${this.templateTerm(name, this.byName[name])}<br />`
44 html += `${this.templateTerm(name, this.byName[name])}<br />`
49 this._entry.innerHTML = html
46 this._entry.innerHTML = html
47+ } else if (this.byName[this.loc]) {
48+ let html = `${this.templateTerm(this.loc, this.byName[this.loc])}<br />${this.templateRelated(this.loc, this.byName[this.loc])}`
49+ this._entry.innerHTML = html
51 let html = `Unknown: ${this.loc}. Retun <a onclick='wiki.go("")'>home</a>, or try a <a onclick='wiki.go("${this.random()}")'>random page</a>.`
51 let html = `Unknown: ${this.loc}. Retun <a onclick='wiki.go("")'>home</a>, or try a <a onclick='wiki.go("${this.random()}")'>random page</a>.`
52 this._entry.innerHTML = html
52 this._entry.innerHTML = html