Skip to content

Commit

Permalink
fix: resize observer throwing errors into console
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Jan 23, 2025
1 parent e501446 commit df66ef6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions e2e/cypress/e2e/translations/namespaces.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@ describe('namespaces in translations', () => {
});

it('displays <none>', () => {
cy.on('uncaught:exception', (err, runnable) => {
// Ignore ResizeObserver - not clear cause, appears only in this test
if (
err.message.includes(
'ResizeObserver loop completed with undelivered notifications'
)
) {
return false; // Prevent Cypress from failing the test
}
return true; // Allow other errors to fail the test
});
createTranslation({ key: 'new-key', namespace: 'new-ns' });
gcy('translations-namespace-banner')
.contains('new-ns')
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/globalContext/useLayoutService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const useLayoutService = ({ quickStart }: Props) => {
useResizeObserver({
ref: bodyRef,
onResize(size) {
setBodyWidth(size.width!);
Promise.resolve(() => setBodyWidth(size.width!));
},
});

Expand Down

0 comments on commit df66ef6

Please sign in to comment.