mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Do not call 'set' in destroyed directory table component (#13567)
This commit is contained in:
parent
aa56e2a758
commit
e870c09438
@ -57,7 +57,11 @@ export default Component.extend({
|
||||
|
||||
@action
|
||||
onHorizontalScroll(primary, replica) {
|
||||
if (this.lastScrollPosition === primary.scrollLeft) {
|
||||
if (
|
||||
this.isDestroying ||
|
||||
this.isDestroyed ||
|
||||
this.lastScrollPosition === primary.scrollLeft
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -65,8 +69,10 @@ export default Component.extend({
|
||||
|
||||
if (!this.ticking) {
|
||||
window.requestAnimationFrame(() => {
|
||||
replica.scrollLeft = this.lastScrollPosition;
|
||||
this.set("ticking", false);
|
||||
if (!this.isDestroying && !this.isDestroyed) {
|
||||
replica.scrollLeft = this.lastScrollPosition;
|
||||
this.set("ticking", false);
|
||||
}
|
||||
});
|
||||
|
||||
this.set("ticking", true);
|
||||
|
Loading…
Reference in New Issue
Block a user