diff --git a/apps/wiki.json b/apps/wiki.json index e46fc1af..11a3dee8 100644 --- a/apps/wiki.json +++ b/apps/wiki.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "📝", - "previous": "&KrBCh2/8NVdDwJrOK0JB/Tszo/lAtjRI4XVdjZ2XNK8=.sha256" + "previous": "&OpEjJ6ZLsIabI1SOzLymRGKlwy2Q6YUI+I3JW5cR7nA=.sha256" } \ No newline at end of file diff --git a/apps/wiki/app.js b/apps/wiki/app.js index b3663c96..c07c2a1b 100644 --- a/apps/wiki/app.js +++ b/apps/wiki/app.js @@ -56,11 +56,13 @@ function new_message() { } ssb.addEventListener('message', function(id) { - let resolve = g_new_message_resolve(); + let resolve = g_new_message_resolve; g_new_message_promise = new Promise(function(resolve, reject) { g_new_message_resolve = resolve; }); - resolve(); + if (resolve) { + resolve(); + } }); core.register('message', async function message_handler(message) { diff --git a/apps/wiki/tf-collection.js b/apps/wiki/tf-collection.js index b08361f7..82161442 100644 --- a/apps/wiki/tf-collection.js +++ b/apps/wiki/tf-collection.js @@ -65,17 +65,19 @@ class TfCollectionElement extends LitElement { let self = this; return html` - + + ${Object.values(this.collection ?? {}).map(x => html``)} - - - - + + + + + + - + diff --git a/apps/wiki/tf-collections-app.js b/apps/wiki/tf-collections-app.js index f23539b5..90f20ae0 100644 --- a/apps/wiki/tf-collections-app.js +++ b/apps/wiki/tf-collections-app.js @@ -91,9 +91,11 @@ class TfCollectionsAppElement extends LitElement { update_wiki_doc() { let want_wiki_doc = this.hash_wiki_doc(); + console.log('looking for', want_wiki_doc); for (let wiki_doc of Object.values(this.wiki_docs ?? {})) { if (wiki_doc.name === want_wiki_doc) { this.wiki_doc = wiki_doc; + console.log('setting', wiki_doc.name); } } } @@ -157,7 +159,7 @@ class TfCollectionsAppElement extends LitElement { @change=${this.on_wiki_changed}> ${this.wiki_doc && this.wiki_doc.parent === this.wiki?.id ? html`