From 6fa630b12d216ac95635c812a0ae4ea10eefe75b Mon Sep 17 00:00:00 2001 From: Karl Seamon Date: Wed, 2 Oct 2024 15:05:16 -0400 Subject: [PATCH] handle missing ResizeObserver!!! --- src/cdk/table/sticky-styler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cdk/table/sticky-styler.ts b/src/cdk/table/sticky-styler.ts index 8f7a465cfff1..286cabacc6be 100644 --- a/src/cdk/table/sticky-styler.ts +++ b/src/cdk/table/sticky-styler.ts @@ -34,8 +34,8 @@ export const STICKY_DIRECTIONS: StickyDirection[] = ['top', 'bottom', 'left', 'r */ export class StickyStyler { private _elemSizeCache = new WeakMap(); - 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;