logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 0aaef50ee5decd5c735e08c8193c6fb8caf2d2e2
parent 05b2351e08012baafd5dd0d80e808ef1181ed3d5
Author: Tusooa Zhu <tusooa@kazv.moe>
Date:   Sat,  7 Aug 2021 18:59:48 -0400

Lint

Diffstat:

Msrc/components/conversation/conversation.js12+++++++-----
Msrc/components/status_content/status_content.js1-
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js @@ -146,7 +146,7 @@ const conversation = { return a }, { - forest: {}, + forest: {} }) debug('threads = ', threads) @@ -217,7 +217,7 @@ const conversation = { topLevel () { const topLevel = this.conversation.reduce((tl, cur) => tl.filter(k => this.getReplies(cur.id).map(v => v.id).indexOf(k.id) === -1), this.conversation) - debug("toplevel =", topLevel) + debug('toplevel =', topLevel) return topLevel }, showingTopLevel () { @@ -282,7 +282,6 @@ const conversation = { statusContentProperties () { return this.conversation.reduce((a, k) => { const id = k.id - const depth = this.depths[id] const props = (() => { if (this.statusContentPropertiesObject[id]) { return this.statusContentPropertiesObject[id] @@ -290,7 +289,7 @@ const conversation = { return { showingTall: false, expandingSubject: false, - showingLongSubject: false, + showingLongSubject: false } })() @@ -448,7 +447,7 @@ const conversation = { cur = this.parentOf(cur) } // nothing found, fall back to toplevel - return topLevel[0].id + return this.topLevel[0] ? this.topLevel[0].id : undefined }, diveIntoStatus (id, preventScroll) { this.diveHistory = [...this.diveHistory, id] @@ -473,6 +472,9 @@ const conversation = { } }, tryScrollTo (id) { + if (!id) { + return + } if (this.isPage) { // set statusId this.$router.push({ name: 'conversation', params: { id } }) diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js @@ -39,7 +39,6 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => { const controlledOrUncontrolledToggle = (obj, name) => { const camelized = camelCase(name) const toggle = `controlledToggle${camelized}` - const controlledName = `controlled${camelized}` const uncontrolledName = `uncontrolled${camelized}` if (obj[toggle]) { obj[toggle]()