Skip to content

Commit b1556fa

Browse files
authored
Fixed resizeObserver issue when you are on loans tab on new profile page. (#329)
Fixed resizeObserver issue when you are on loans tab on new profile page.
1 parent 157d2ba commit b1556fa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/sort-filter-bar/sort-filter-bar.ts

+7
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ export class SortFilterBar
216216
private disconnectResizeObserver(
217217
resizeObserver: SharedResizeObserverInterface
218218
) {
219+
// return if element not defined
220+
if (!this.sortSelectorContainer || !this.desktopSortContainer) return;
221+
219222
resizeObserver.removeObserver({
220223
target: this.sortSelectorContainer,
221224
handler: this,
@@ -229,6 +232,10 @@ export class SortFilterBar
229232

230233
private setupResizeObserver() {
231234
if (!this.resizeObserver) return;
235+
236+
// return if element not defined
237+
if (!this.sortSelectorContainer || !this.desktopSortContainer) return;
238+
232239
this.resizeObserver.addObserver({
233240
target: this.sortSelectorContainer,
234241
handler: this,

0 commit comments

Comments
 (0)