mirror of
https://git.notfire.cc/notfire/akkoma-fe.git
synced 2026-01-11 05:23:16 -08:00
fix posts not working from pages other than the timeline
This commit is contained in:
parent
526f7464d1
commit
0adbff7856
1 changed files with 4 additions and 2 deletions
|
|
@ -436,7 +436,9 @@ const PostStatusForm = {
|
|||
|
||||
const postHandler = this.postHandler ? this.postHandler : statusPoster.postStatus
|
||||
|
||||
let bef = document.getElementsByClassName("Timeline")[0].scrollHeight
|
||||
let bef = null
|
||||
if (document.getElementsByClassName("Timeline") > 0)
|
||||
bef = document.getElementsByClassName("Timeline")[0].scrollHeight
|
||||
|
||||
postHandler(postingOptions).then((data) => {
|
||||
if (!data.error) {
|
||||
|
|
@ -448,7 +450,7 @@ const PostStatusForm = {
|
|||
this.posting = false
|
||||
|
||||
// same as timeline.js
|
||||
if (this.$store.getters.mergedConfig.fixupScrollOnPostWStreaming && window.scrollY > 0) {
|
||||
if (this.$store.getters.mergedConfig.fixupScrollOnPostWStreaming && window.scrollY > 0 && (document.getElementsByClassName("Timeline") > 0)) {
|
||||
let after = document.getElementsByClassName("Timeline")[0].scrollHeight
|
||||
let diff = bef - after
|
||||
if (diff < 0) diff = diff * -1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue