Skip to content

Commit

Permalink
handle missing ResizeObserver!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
kseamon committed Oct 2, 2024
1 parent 5a2ed27 commit 6fa630b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cdk/table/sticky-styler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export const STICKY_DIRECTIONS: StickyDirection[] = ['top', 'bottom', 'left', 'r
*/
export class StickyStyler {
private _elemSizeCache = new WeakMap<HTMLElement, {width: number; height: number}>();
private _resizeObserver = window?.ResizeObserver
? new window.ResizeObserver(entries => this._updateCachedSizes(entries))
private _resizeObserver = globalThis?.ResizeObserver
? new globalThis.ResizeObserver(entries => this._updateCachedSizes(entries))
: null;
private _updatedStickyColumnsParamsToReplay: UpdateStickyColumnsParams[] = [];
private _stickyColumnsReplayTimeout: number | null = null;
Expand Down

0 comments on commit 6fa630b

Please sign in to comment.