mirror of
https://github.com/discourse/discourse.git
synced 2025-03-21 11:45:35 +08:00
DEV: potential flakey specs fixes (#21307)
This commit is contained in:
parent
0dea991156
commit
cd24656570
@ -452,7 +452,10 @@ export default class ChatLivePane extends Component {
|
||||
|
||||
// if the last visible message is not fully visible, we don't want to mark it as read
|
||||
// attempt to mark previous one as read
|
||||
if (!this.#isBottomOfMessageVisible(element, this.scrollable)) {
|
||||
if (
|
||||
element &&
|
||||
!this.#isBottomOfMessageVisible(element, this.scrollable)
|
||||
) {
|
||||
lastUnreadVisibleMessage = lastUnreadVisibleMessage.previousMessage;
|
||||
|
||||
if (
|
||||
|
@ -33,6 +33,10 @@ export default class ChatSidePanel extends Component {
|
||||
|
||||
@action
|
||||
didResize(element, size) {
|
||||
if (this.isDestroying || this.isDestroyed) {
|
||||
return;
|
||||
}
|
||||
|
||||
const parentWidth = element.parentElement.getBoundingClientRect().width;
|
||||
const mainPanelWidth = parentWidth - size.width;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user