File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
site/src/pages/WorkspaceBuildPage Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,14 @@ const ScrollArea: FC<HTMLProps<HTMLDivElement>> = () => {
221
221
const contentRef = useRef < HTMLDivElement > ( null ) ;
222
222
const [ height , setHeight ] = useState < CSSProperties [ "height" ] > ( "100%" ) ;
223
223
useLayoutEffect ( ( ) => {
224
+ // TODO: Mock ResizeObserver in the test environment. This is a temporary
225
+ // workaround because the recommended way to mock ResizeObserver, as
226
+ // described in the following reference, did not work:
227
+ // https://github.com/ZeeCoder/use-resize-observer/issues/40#issuecomment-991256805
228
+ if ( window . ResizeObserver === undefined ) {
229
+ return ;
230
+ }
231
+
224
232
const contentEl = contentRef . current ;
225
233
if ( ! contentEl ) {
226
234
return ;
You can’t perform that action at this time.
0 commit comments